Skip to content

fix(controls): use primary when filter is active - #5299

Merged
juliusknorr merged 1 commit into
nextcloud:mainfrom
fitrahmunir:fix/use-primary-when-filter-is-active
Nov 20, 2023
Merged

fix(controls): use primary when filter is active#5299
juliusknorr merged 1 commit into
nextcloud:mainfrom
fitrahmunir:fix/use-primary-when-filter-is-active

Conversation

@fitrahmunir

Copy link
Copy Markdown
Contributor

Summary

Added a conditional button type and fixed filter button styles when the popover is open

TODO

  • Adding a conditional button type to the filter button
  • Fixing filter button styles when the popover is open

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

background-color: #212121;
}
&.button-vue--vue-primary {
background-color: var(--color-primary-element);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should already be set through the type itself

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I also need this style to override the background color of the filter button when the filter is checked

Screen Shot 2023-11-20 at 5 34 31 PM

Comment thread src/components/Controls.vue Outdated
Comment on lines +513 to +516
background-color: rgb(245, 245, 245);
[data-themes=dark] & {
background-color: #212121;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you elaborate what that special styling would be needed for? I couldn't notice it would have any effect when testing out the PR. In general we should avoid any hard coded color values and use available css vars wherever appropriate these days.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The difference is that when the popover opens, the filter button doesn't look like it's been pressed.

With styles:
Screen Shot 2023-11-20 at 5 19 34 PM

Without styles:
Screen Shot 2023-11-20 at 5 20 06 PM

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I refer to Talk when the popover opens, the filter button will be like this

Screen Shot 2023-11-20 at 5 22 32 PM

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

After checking the existing color vars, the required style is just like this

Screen Shot 2023-11-20 at 5 56 00 PM

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah good point then, especially with those variables that seems good

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I will update the code

@juliusknorr

Copy link
Copy Markdown
Member

Thanks a lot for your pull request. I left some comments inline to clarify.

@fitrahmunir
fitrahmunir force-pushed the fix/use-primary-when-filter-is-active branch 2 times, most recently from ac2fabd to 9513c39 Compare November 20, 2023 14:24
Signed-off-by: Fitrah Munir <fitrahmunir@outlook.com>
@fitrahmunir
fitrahmunir force-pushed the fix/use-primary-when-filter-is-active branch from 9513c39 to 80e0935 Compare November 20, 2023 14:30
@juliusknorr
juliusknorr merged commit f223a39 into nextcloud:main Nov 20, 2023
@juliusknorr

Copy link
Copy Markdown
Member

Thanks a lot for your contribution @fitrahfm

@github-actions

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

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.

Filter by Tag when clicking on Tag is disorienting

2 participants