Skip to content

fix: collection color management#3905

Merged
gaspergrom merged 1 commit intomainfrom
fix/colors-collections
Mar 10, 2026
Merged

fix: collection color management#3905
gaspergrom merged 1 commit intomainfrom
fix/colors-collections

Conversation

@gaspergrom
Copy link
Contributor

@gaspergrom gaspergrom commented Mar 10, 2026

Note

Low Risk
UI-only changes to form layout and inputs; no backend/API or data model changes, with minimal risk beyond minor UX/validation regressions.

Overview
Adjusts the admin “Add/Edit collection” form UI for appearance fields.

The Appearance section is repositioned below the category selector, its header styling is updated, and the collection color control changes from a native type="color" picker to a HEX text input with an optional preview swatch prefix (shown only when a color is set).

Written by Cursor Bugbot for commit e3c5e88. This will update automatically on new commits. Configure here.

Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
@gaspergrom gaspergrom self-assigned this Mar 10, 2026
@github-actions
Copy link
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

2 similar comments
@github-actions
Copy link
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@github-actions
Copy link
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@gaspergrom gaspergrom merged commit abc25b9 into main Mar 10, 2026
15 checks passed
@gaspergrom gaspergrom deleted the fix/colors-collections branch March 10, 2026 09:46
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

<span
v-if="form.color"
class="w-6 h-6 rounded-full flex-shrink-0 border border-gray-200"
:style="{ backgroundColor: form.color || '#009AFF' }"
Copy link

Choose a reason for hiding this comment

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

Unreachable fallback due to v-if guard

Low Severity

The v-if="form.color" on line 178 ensures the color preview span only renders when form.color is truthy, which makes the || '#009AFF' fallback in the backgroundColor style binding on line 180 unreachable dead code. If the intent was to show a default color swatch when the field is empty, the v-if prevents that. If the intent was to only show a preview when the user has typed something, the fallback is unnecessary.

Fix in Cursor Fix in Web

class="w-6 h-6 rounded-full flex-shrink-0 border border-gray-200"
:style="{ backgroundColor: form.color || '#009AFF' }"
/>
</template>
Copy link

Choose a reason for hiding this comment

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

Empty prefix div renders with padding when color blank

Low Severity

The #prefix slot is always provided to lf-input, so the $slots['prefix'] check inside Input.vue is always truthy — even when form.color is falsy and the inner span doesn't render via v-if. This causes the c-input__prefix wrapper div (which applies pl-2 padding) to always be present in the DOM, resulting in an empty padded area inside the input when no color is entered. The text position also visually shifts when a color is typed and the circle appears.

Fix in Cursor Fix in Web

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