Skip to content

fix: Error state on Item Card (M2-9441) - #2098

Merged
aweiland merged 1 commit into
developfrom
fix/M2-9441-error-state-on-item-card
Jun 30, 2025
Merged

fix: Error state on Item Card (M2-9441)#2098
aweiland merged 1 commit into
developfrom
fix/M2-9441-error-state-on-item-card

Conversation

@andrevitalb

Copy link
Copy Markdown
Contributor
  • Delivered the fix or feature branches into develop or release branches via Squash and Merge (to keep clean history)

📝 Description

🔗 Jira Ticket M2-9441

This PR fixes an issue where after clicking "Save & Publish" on the applet editor screen, editing items, if an item had errors, the corresponding card wouldn't reflect this in its styling

🪤 Peer Testing

  1. Login to the admin panel.
  2. Start editing any applet.
  3. Edit the applet's items.
  4. Perform any update that will result in error (e.g. Add an empty item).
  5. Switch to a valid item.
  6. Click Save & Publish.
  7. Expected: A modal specifying the error should show up & the faulty item's card on the left bar should be marked as with error (background color should be error_container (error[90]))
    93966

@andrevitalb andrevitalb changed the title fix: Error state on Item Card fix: Error state on Item Card (M2-9441) Jun 25, 2025
@aws-amplify-us-east-1

Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-2098.d19gtpld8yi51u.amplifyapp.com

@farmerpaul farmerpaul left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't quite understand why this fixes the issue, but it does.

@andrevitalb

Copy link
Copy Markdown
Contributor Author

@farmerpaul Had do to some digging to figure out why. Turns out in styled-components, each CSS property declaration in the template string needs to be terminated with a semicolon, but also each line of the template literal expression needs to be terminated with a semicolon as part of the JavaScript syntax.

When moving the semicolon inside, it becomes part of the CSS string, but the overall template literal expression doesn't have a terminating semicolon, breaking the styled-component.

@aweiland
aweiland merged commit efd1b82 into develop Jun 30, 2025
6 checks passed
@aweiland
aweiland deleted the fix/M2-9441-error-state-on-item-card branch June 30, 2025 18:20
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.

3 participants