Skip to content

feat: show admin figma-ux correlation fixes#831

Open
priscila-moneo wants to merge 1 commit intomasterfrom
feature/figma-and-ux-correlations-fixes
Open

feat: show admin figma-ux correlation fixes#831
priscila-moneo wants to merge 1 commit intomasterfrom
feature/figma-and-ux-correlations-fixes

Conversation

@priscila-moneo
Copy link

@priscila-moneo priscila-moneo commented Mar 18, 2026

ref: https://app.clickup.com/t/86b8tt4df

image image image image image

Summary by CodeRabbit

  • New Features

    • Added opening and expiration date columns to sponsor forms list view
    • Introduced enhanced image upload component with validation and size controls
  • Tests

    • Removed test case for archived action cell styling
  • Chores

    • Updated dependency versions
    • Enhanced UI styling consistency across tables (font weight, padding, borders)
    • Updated copyright year

@coderabbitai
Copy link

coderabbitai bot commented Mar 18, 2026

Warning

Rate limit exceeded

@priscila-moneo has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 7 minutes and 20 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2173fff3-eca1-4b12-9689-5f5fb694c6a0

📥 Commits

Reviewing files that changed from the base of the PR and between 9e66f31 and e5545a9.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (12)
  • package.json
  • src/actions/sponsor-forms-actions.js
  • src/components/mui/__tests__/mui-table-editable.test.js
  • src/components/mui/editable-table/mui-table-editable.js
  • src/components/mui/editable-table/mui-table-editable.module.less
  • src/components/mui/sortable-table/mui-table-sortable.js
  • src/components/mui/table/mui-table.js
  • src/i18n/en.json
  • src/pages/sponsors/sponsor-form-item-list-page/components/sponsor-form-item-form.js
  • src/pages/sponsors/sponsor-forms-list-page/index.js
  • src/pages/sponsors/sponsor-forms-tab/index.js
  • src/reducers/sponsors/sponsor-forms-list-reducer.js
📝 Walkthrough

Walkthrough

This PR adds new date fields (opens_at, expires_at) to sponsor forms across the data, reducer, and UI layers. It includes MUI component styling normalization, a new onCellChange callback for editable tables, replaces legacy image upload with UploadInputV3, and updates translations and table layouts.

Changes

Cohort / File(s) Summary
Dependencies
package.json
Bumped openstack-uicore-foundation from 4.2.23 to 4.2.25-beta.1.
Data & Reducer Layer
src/actions/sponsor-forms-actions.js, src/reducers/sponsors/sponsor-forms-list-reducer.js
Extended sponsor form API request fields to include opens_at and expires_at; added default empty string values for these fields in reducer transformations.
MUI Table Components Styling
src/components/mui/table/mui-table.js, src/components/mui/editable-table/mui-table-editable.js, src/components/mui/editable-table/mui-table-editable.module.less, src/components/mui/sortable-table/mui-table-sortable.js
Normalized font weight to "normal" across headers, cells, and action buttons; standardized padding on icon buttons to 0; added onCellChange prop to MuiTableEditable for per-cell change handling; applied dotted border styling to action cells; updated delete confirmation button color from hex to "warning".
MUI Table Tests
src/components/mui/__tests__/mui-table-editable.test.js
Removed test case for archived styles on archive/unarchive action cells.
Sponsor Forms List Page
src/pages/sponsors/sponsor-forms-list-page/index.js
Added opens_at and expires_at columns with epoch-to-date formatting; widened items_qty column; improved Manage Items action cell styling and labels; upgraded page title from h3 to h1; imported epochToMoment utility.
Sponsor Forms Tab
src/pages/sponsors/sponsor-forms-tab/index.js
Added explicit widths to table columns; updated Manage Items and Customize button styling via sx props; adjusted Archive and Customize column widths; enhanced translation key usage for singular/plural item labels.
Sponsor Form Item Form
src/pages/sponsors/sponsor-form-item-list-page/components/sponsor-form-item-form.js
Replaced MuiFormikUpload with UploadInputV3 for image uploads; added image format, size, and quantity constraints; wired uploaded file data to formik state.
Internationalization
src/i18n/en.json
Added translation keys item, none, and manage_items for sponsor forms; reworded image-related labels from "Images" to "Image File"; updated meta field default labeling from "Is Default?" to "Default Value".

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • caseylocker
  • martinquiroga-exo
  • smarcet

Poem

🐰 ✨ New dates bloom in sponsor forms so fine,
Opens and expires in perfect align,
Cells now change with a callback so sweet,
Uploads refined with UploadInputV3 neat,
Tables restyled with font weights divine!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title mentions 'figma-ux correlation fixes' but the changeset primarily adds new columns (opens_at, expires_at), updates styling, and implements image upload functionality—not figma-ux correlation fixes. Revise the title to reflect the actual changes, such as 'feat: add opens_at/expires_at columns and styling updates to sponsor forms and items' or 'feat: enhance sponsor forms UI with date columns and improved styling'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/figma-and-ux-correlations-fixes
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/components/mui/editable-table/mui-table-editable.module.less (1)

4-13: ⚠️ Potential issue | 🟡 Minor

align-self: center has no effect on absolutely positioned elements.

The ::before pseudo-element is position: absolute, so align-self won't center it vertically. The border will render starting from top: 0 with 60% height rather than being vertically centered.

To center the dotted border vertically:

🔧 Proposed fix
   &::before {
     content: "";
     position: absolute;
-    top: 0;
-    bottom: 0;
+    top: 50%;
     left: 0;
     border-left: 1px dashed `#e0e0e0`;
     height: 60%;
-    align-self: center;
+    transform: translateY(-50%);
   }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/mui/editable-table/mui-table-editable.module.less` around
lines 4 - 13, The ::before pseudo-element in the &::before rule is absolutely
positioned so align-self: center is ignored; update the &::before styles (the
pseudo-element selector) to vertically center the 60% height dashed border by
removing the conflicting top: 0 and bottom: 0 and instead use top: 50% plus
transform: translateY(-50%) (keep height: 60% and border-left as-is) so the
dashed line is centered vertically within the container.
🧹 Nitpick comments (2)
src/i18n/en.json (1)

2669-2669: Minor key-value semantic mismatch.

The key images uses plural form but the value is now singular "Image File". This works functionally but could cause confusion when maintaining the codebase. Consider renaming the key to image_file or image if it refers to a single image upload section, or keep as-is if this is intentional for backward compatibility.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/i18n/en.json` at line 2669, The i18n key "images" is plural but its value
is singular ("Image File"), causing a semantic mismatch; either rename the key
to "image_file" or "image" and update all references (e.g., any i18n.t('images')
or t('images') usages) to the new key, or alternatively change the value to a
plural phrase ("Image Files") to match the existing key; if you must preserve
backward compatibility, add the new key with the correct singular value and keep
"images" as an alias (or vice versa) and mark the old key for deprecation.
package.json (1)

92-92: Update dependency to stable version.

The package.json pins openstack-uicore-foundation to 4.2.25-beta.1, but the latest stable version is 4.2.23. Update to the stable release unless there is a specific requirement for the prerelease features.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` at line 92, The package.json currently pins the dependency
"openstack-uicore-foundation" to a prerelease version "4.2.25-beta.1"; update
that dependency entry to the stable release "4.2.23" by replacing the version
string for the "openstack-uicore-foundation" dependency in package.json (ensure
package lock/yarn lock is updated afterwards and run install to refresh
lockfile).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/components/mui/editable-table/mui-table-editable.js`:
- Line 188: Replace the confirm button color value used in the ConfirmDialog
configuration: locate the confirmButtonColor property inside the options/object
in mui-table-editable.js (used by the ConfirmDialog component) and change its
value from the MUI theme name "warning" to the hex string "#DD6B55" so it
matches the established pattern used elsewhere (e.g., mui-table.js,
meta-field-values.js, additional-input-list.js).

In
`@src/pages/sponsors/sponsor-form-item-list-page/components/sponsor-form-item-form.js`:
- Around line 183-187: The onRemove callback is using file.filename which
doesn't match the actual payload (it provides name), causing the filter to never
match; update the filter in the onRemove handler to compare img.filename (or the
stored image identifier) against file.name instead of file.filename, keeping the
rest of the logic (const newImages = (formik.values.images || []).filter(...);
formik.setFieldValue("images", newImages)) intact so removals correctly remove
the uploaded image.

In `@src/pages/sponsors/sponsor-forms-tab/index.js`:
- Around line 216-220: The pluralization logic uses strict equality against
row.items_count which can be a string; coerce once to a numeric value in the
render/mapper where this snippet is built (e.g., compute const itemsCount =
Number(row.items_count) || 0) and then use itemsCount both for the displayed
number and for the comparison (itemsCount === 1) to decide singular/plural;
update references to row.items_count in this template to use the new itemsCount
variable so non-numeric/string API values are handled consistently.

---

Outside diff comments:
In `@src/components/mui/editable-table/mui-table-editable.module.less`:
- Around line 4-13: The ::before pseudo-element in the &::before rule is
absolutely positioned so align-self: center is ignored; update the &::before
styles (the pseudo-element selector) to vertically center the 60% height dashed
border by removing the conflicting top: 0 and bottom: 0 and instead use top: 50%
plus transform: translateY(-50%) (keep height: 60% and border-left as-is) so the
dashed line is centered vertically within the container.

---

Nitpick comments:
In `@package.json`:
- Line 92: The package.json currently pins the dependency
"openstack-uicore-foundation" to a prerelease version "4.2.25-beta.1"; update
that dependency entry to the stable release "4.2.23" by replacing the version
string for the "openstack-uicore-foundation" dependency in package.json (ensure
package lock/yarn lock is updated afterwards and run install to refresh
lockfile).

In `@src/i18n/en.json`:
- Line 2669: The i18n key "images" is plural but its value is singular ("Image
File"), causing a semantic mismatch; either rename the key to "image_file" or
"image" and update all references (e.g., any i18n.t('images') or t('images')
usages) to the new key, or alternatively change the value to a plural phrase
("Image Files") to match the existing key; if you must preserve backward
compatibility, add the new key with the correct singular value and keep "images"
as an alias (or vice versa) and mark the old key for deprecation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 17dfc42e-41a7-4f3a-97f0-c73009ea606e

📥 Commits

Reviewing files that changed from the base of the PR and between 6152c8e and 9e66f31.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (12)
  • package.json
  • src/actions/sponsor-forms-actions.js
  • src/components/mui/__tests__/mui-table-editable.test.js
  • src/components/mui/editable-table/mui-table-editable.js
  • src/components/mui/editable-table/mui-table-editable.module.less
  • src/components/mui/sortable-table/mui-table-sortable.js
  • src/components/mui/table/mui-table.js
  • src/i18n/en.json
  • src/pages/sponsors/sponsor-form-item-list-page/components/sponsor-form-item-form.js
  • src/pages/sponsors/sponsor-forms-list-page/index.js
  • src/pages/sponsors/sponsor-forms-tab/index.js
  • src/reducers/sponsors/sponsor-forms-list-reducer.js
💤 Files with no reviewable changes (1)
  • src/components/mui/tests/mui-table-editable.test.js

type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonColor: "warning",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify showConfirmDialog implementation to confirm it uses SweetAlert-style color handling
ast-grep --pattern $'showConfirmDialog($$$)'

# Check the implementation of showConfirmDialog
fd -t f "showConfirmDialog" --exec cat {}

Repository: fntechgit/summit-admin

Length of output: 11371


🏁 Script executed:

# Find the ConfirmDialog component definition
fd -t f "confirm-dialog" --exec grep -l "ConfirmDialog" {} \;

Repository: fntechgit/summit-admin

Length of output: 104


🏁 Script executed:

# Search for ConfirmDialog export/definition
rg "export.*ConfirmDialog|function ConfirmDialog|const ConfirmDialog" -A 5

Repository: fntechgit/summit-admin

Length of output: 514


🏁 Script executed:

# Find where ConfirmDialog is imported in the showConfirmDialog file
rg -B 20 "const showConfirmDialog" | head -30

Repository: fntechgit/summit-admin

Length of output: 3452


🏁 Script executed:

# Read the full ConfirmDialog implementation
cat -n src/components/mui/confirm-dialog.js

Repository: fntechgit/summit-admin

Length of output: 2913


Use consistent color value #DD6B55 instead of "warning" for the confirm button.

The ConfirmDialog component uses MUI's Button, which accepts both hex colors and MUI theme color names. However, the rest of the codebase consistently uses "#DD6B55" for confirmation button colors (see mui-table.js, meta-field-values.js, additional-input-list.js, etc.). Update this to match the established pattern.

-      confirmButtonColor: "warning",
+      confirmButtonColor: "#DD6B55",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
confirmButtonColor: "warning",
confirmButtonColor: "#DD6B55",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/mui/editable-table/mui-table-editable.js` at line 188, Replace
the confirm button color value used in the ConfirmDialog configuration: locate
the confirmButtonColor property inside the options/object in
mui-table-editable.js (used by the ConfirmDialog component) and change its value
from the MUI theme name "warning" to the hex string "#DD6B55" so it matches the
established pattern used elsewhere (e.g., mui-table.js, meta-field-values.js,
additional-input-list.js).

Comment on lines +216 to +220
`${row.items_count} ${
row.items_count === 1
? T.translate("edit_sponsor.forms_tab.item")
: T.translate("edit_sponsor.forms_tab.items")
}`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Verify how `items_count` is produced/normalized before reaching the table
rg -n -C3 '\bitems_count\b'

Repository: fntechgit/summit-admin

Length of output: 4919


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Examine the full reducer context to understand data transformation
echo "=== Examining reducer at lines 115-165 ==="
sed -n '110,170p' src/reducers/sponsors/sponsor-page-forms-list-reducer.js

Repository: fntechgit/summit-admin

Length of output: 1577


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Check if there's any API response processing or type coercion
echo "=== Search for API client setup or response handling ==="
rg -l "axios|fetch|api" --max-count 5 src/ | head -10

echo ""
echo "=== Check sponsor-forms-actions to see how API calls are made ==="
sed -n '500,520p' src/actions/sponsor-forms-actions.js

echo ""
echo "=== Look for any response interceptors or API configuration ==="
rg -n "interceptor|transform" src/ | head -20

Repository: fntechgit/summit-admin

Length of output: 8401


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Check the component definition for prop types
echo "=== Examine the full component file to see prop types ==="
wc -l src/pages/sponsors/sponsor-forms-tab/index.js

# Get context around the render function and check for PropTypes
echo ""
echo "=== Check for component prop definitions ==="
rg -n "propTypes|typescript|interface.*Form" src/pages/sponsors/sponsor-forms-tab/index.js -A 3 -B 1

# Look for mock data or tests that show actual data structure
echo ""
echo "=== Search for test data showing items_count structure ==="
rg -n "items_count.*:" src/ --type json --type js | head -20

Repository: fntechgit/summit-admin

Length of output: 219


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Read the component around the render function showing items_count
echo "=== Component render function context (lines 200-230) ==="
sed -n '200,230p' src/pages/sponsors/sponsor-forms-tab/index.js

# Check imports and setup to understand data source
echo ""
echo "=== Component imports and setup (first 50 lines) ==="
head -50 src/pages/sponsors/sponsor-forms-tab/index.js

# Look for where table data comes from
echo ""
echo "=== Search for data source in component ==="
rg -n "forms|managedForms|customizedForms" src/pages/sponsors/sponsor-forms-tab/index.js | head -15

Repository: fntechgit/summit-admin

Length of output: 3456


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Search for any mock data or test files with actual items_count values
echo "=== Search for mock data with items_count ==="
rg -n '"items_count"' src/ --type json -B 1 -A 1 | head -30

# Check test files
echo ""
echo "=== Look for test files related to sponsor forms ==="
fd "test|spec" src/pages/sponsors/sponsor-forms-tab/ 2>/dev/null || echo "No test dir found"

# Look at reducer more carefully - check what type `a` is
echo ""
echo "=== Check where payload.response.data comes from ==="
sed -n '100,130p' src/reducers/sponsors/sponsor-page-forms-list-reducer.js

Repository: fntechgit/summit-admin

Length of output: 111


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Try to find API response examples or backend documentation
echo "=== Search for any .md or README files that document API ==="
find src/ -name "README*" -o -name "*.md" | xargs cat 2>/dev/null | grep -i "items_count" || echo "No docs found"

# Look at the beginning of the reducer file for context
echo ""
echo "=== Check reducer file start and action types ==="
head -30 src/reducers/sponsors/sponsor-page-forms-list-reducer.js

# Check the actual reducer action handler more carefully
echo ""
echo "=== Full first items_count reducer case ==="
sed -n '100,135p' src/reducers/sponsors/sponsor-page-forms-list-reducer.js

# Look at any comments or type hints
echo ""
echo "=== Search for comments about items_count ==="
rg -B 2 -A 2 "items_count" src/reducers/sponsors/sponsor-page-forms-list-reducer.js | head -40

Repository: fntechgit/summit-admin

Length of output: 2790


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Verify the exact line numbers for the code in question
echo "=== Confirm exact code at lines 216-220 ==="
sed -n '216,220p' src/pages/sponsors/sponsor-forms-tab/index.js

# Check if there are other similar numeric comparisons that might have same issue
echo ""
echo "=== Search for similar strict equality comparisons with object properties ==="
rg -n '===\s*[0-9]' src/pages/sponsors/sponsor-forms-tab/index.js

Repository: fntechgit/summit-admin

Length of output: 413


Harden pluralization against non-numeric items_count values.

The strict equality check row.items_count === 1 on line 217 will fail if the API payload provides items_count as a string (e.g., "1"), resulting in incorrect pluralization. The reducer passes items_count directly from the API without type coercion, and one reducer case attempts a fallback (items_count: a.items_count || 0) that doesn't ensure numeric type. Coerce to a number once in the render function to handle this edge case.

Suggested patch
-      render: (row) =>
-        `${row.items_count} ${
-          row.items_count === 1
-            ? T.translate("edit_sponsor.forms_tab.item")
-            : T.translate("edit_sponsor.forms_tab.items")
-        }`
+      render: (row) => {
+        const itemsCount = Number(row.items_count) || 0;
+        return `${itemsCount} ${
+          itemsCount === 1
+            ? T.translate("edit_sponsor.forms_tab.item")
+            : T.translate("edit_sponsor.forms_tab.items")
+        }`;
+      }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
`${row.items_count} ${
row.items_count === 1
? T.translate("edit_sponsor.forms_tab.item")
: T.translate("edit_sponsor.forms_tab.items")
}`
render: (row) => {
const itemsCount = Number(row.items_count) || 0;
return `${itemsCount} ${
itemsCount === 1
? T.translate("edit_sponsor.forms_tab.item")
: T.translate("edit_sponsor.forms_tab.items")
}`;
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/pages/sponsors/sponsor-forms-tab/index.js` around lines 216 - 220, The
pluralization logic uses strict equality against row.items_count which can be a
string; coerce once to a numeric value in the render/mapper where this snippet
is built (e.g., compute const itemsCount = Number(row.items_count) || 0) and
then use itemsCount both for the displayed number and for the comparison
(itemsCount === 1) to decide singular/plural; update references to
row.items_count in this template to use the new itemsCount variable so
non-numeric/string API values are handled consistently.

@priscila-moneo priscila-moneo force-pushed the feature/figma-and-ux-correlations-fixes branch from 9e66f31 to e5545a9 Compare March 18, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant