Skip to content

feat: add color property to cards and implement color selection feature#7787

Open
luka-nextcloud wants to merge 1 commit intomainfrom
card-background-color
Open

feat: add color property to cards and implement color selection feature#7787
luka-nextcloud wants to merge 1 commit intomainfrom
card-background-color

Conversation

@luka-nextcloud
Copy link
Copy Markdown
Contributor

Summary

  • Added a new color column to the deck_cards table.
  • Updated the Card entity and service logic to handle the new color property.

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Tests (unit, integration, api and/or acceptance) are included
  • Documentation (manuals or wiki) has been updated or is not required

@github-actions
Copy link
Copy Markdown
Contributor

🐢 Performance warning.
It looks like the query count of the integration tests increased with this PR.
Database query count is now 94744 was 93102 (+1.76%)
Please check your code again. If you added a new test this can be expected and the base value in tests/integration/base-query-count.txt can be increased.

Copy link
Copy Markdown
Member

@grnd-alt grnd-alt left a comment

Choose a reason for hiding this comment

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

code changed is valid, great work!

I don't really like the layout though, I don't think the color picker should take up an entire row while being so small in width. Maybe we could put it in line with the due date selector or move into the three dot menu? maybe @marcoambrosini has a great idea?

just leaving some screenshots here that look weird because of themes:

text gets invisible if the card is the text color for the theme, might be hard to solve but as we support both light and dark mode it should always be readable for everyone.
Image

the default color for the picker also makes it hard to see in light mode:
Image

@luka-nextcloud
Copy link
Copy Markdown
Contributor Author

@marcoambrosini @grnd-alt Please check this video:
demo.webm

Copy link
Copy Markdown
Member

@marcoambrosini marcoambrosini left a comment

Choose a reason for hiding this comment

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

Nice @luka-nextcloud, thanks for the screencast

A couple of changes I would make:

  • move the button to the left of the card action menu
Image
  • Make the button square, size: var(--default-clickable-area)
  • Add a tooltip to the button: "Choose card color"

@luka-nextcloud
Copy link
Copy Markdown
Contributor Author

@marcoambrosini @grnd-alt We are using component NcAppSidebar to display card. And this component does not provide slot to show the button on the left of actions menu. However, there is a slot tertiary-actions which can display custom html on the left of card title. What do you think?
image

@marcoambrosini
Copy link
Copy Markdown
Member

I would then add this as an action within the action menu itself, what do you think @luka-nextcloud ?

@luka-nextcloud
Copy link
Copy Markdown
Contributor Author

@marcoambrosini Do you mean like this? It looks ok to me
image
image

@marcoambrosini
Copy link
Copy Markdown
Member

Very nice, yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set individual background color of card

4 participants