Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make unread counter primary colour #3070

Merged
merged 1 commit into from
Aug 26, 2022
Merged

Make unread counter primary colour #3070

merged 1 commit into from
Aug 26, 2022

Conversation

GretaD
Copy link
Contributor

@GretaD GretaD commented Aug 19, 2022

tested manually on mail, i cannot connect to nc/vue
counter

fixes #3054

@GretaD GretaD added 3. to review Waiting for reviews design Design, UX, interface and interaction design labels Aug 19, 2022
@GretaD GretaD self-assigned this Aug 19, 2022
Copy link
Contributor

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

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

I'd suggest that we use the primary-element colors so that if the primary color is a light grey for example, we fallback to a value that still has enough contrast.

src/components/NcCounterBubble/NcCounterBubble.vue Outdated Show resolved Hide resolved
src/components/NcCounterBubble/NcCounterBubble.vue Outdated Show resolved Hide resolved
@raimund-schluessler
Copy link
Contributor

I'd suggest that we use the primary-element colors so that if the primary color is a light grey for example, we fallback to a value that still has enough contrast.

At least in the docs, this is hardly even readable. But maybe the variables in the docs need an update, I didn't test with server though.

Screenshot 2022-08-19 at 10-12-35 Nextcloud Vue Style Guide

Copy link
Contributor

@raimund-schluessler raimund-schluessler left a comment

Choose a reason for hiding this comment

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

Is this how it's supposed to look like?
Screenshot 2022-08-22 at 16-02-44 Nextcloud Vue Style Guide

I think the contrast for the Normal Counter is terrible. @jancborchardt @nimishavijay Can you have a look, please?

@GretaD
Copy link
Contributor Author

GretaD commented Aug 22, 2022

Is this how it's supposed to look like?

no, it is suppose to look like my screenshot on the description

@GretaD
Copy link
Contributor Author

GretaD commented Aug 22, 2022

yeah, maybe we need --color-primary-element-lighter, instead of light @juliushaertl ?

@juliusknorr
Copy link
Contributor

Either that or rather adjust it so that it matches the calculation of --color-primary-light depending on how --color-primary-element-light is currently used. I'll try to check the usages on our existing code base

@juliusknorr
Copy link
Contributor

See nextcloud/server#33641

@juliusknorr
Copy link
Contributor

Tested and works in combination with the server pr

@raimund-schluessler
Copy link
Contributor

Tested and works in combination with the server pr

If this requires a server PR, it means it will only work with fixed servers. Since this affects a component already widely used, this will be quite problematic. It could mean that this component in nextcloud/vue 6.0.0 will only work with server 25 and above (unless nextcloud/server#33641 is backported and widely distributed).

@ChristophWurst
Copy link
Contributor

It could mean that this component in nextcloud/vue 6.0.0 will only work with server 25 and above (unless nextcloud/server#33641 is backported and widely distributed).

Yes, same issue as #3057 (comment). The plan is to have another major release v7 that will be Nextcloud 25+ only.

@raimund-schluessler raimund-schluessler added the breaking PR that requires a new major version label Aug 24, 2022
@raimund-schluessler
Copy link
Contributor

It could mean that this component in nextcloud/vue 6.0.0 will only work with server 25 and above (unless nextcloud/server#33641 is backported and widely distributed).

Yes, same issue as #3057 (comment). The plan is to have another major release v7 that will be Nextcloud 25+ only.

Then let's not merge this until we have 6.0.0 stable release. Otherwise we need to backport every PR/fix to a stable6 branch already.

@raimund-schluessler raimund-schluessler added this to the 7.0.0 milestone Aug 24, 2022
@skjnldsv
Copy link
Contributor

If this requires a server PR, it means it will only work with fixed servers. Since this affects a component already widely used, this will be quite problematic

We can add variables fallback. If they are not defined, they will use the second value

@raimund-schluessler
Copy link
Contributor

If this requires a server PR, it means it will only work with fixed servers. Since this affects a component already widely used, this will be quite problematic

We can add variables fallback. If they are not defined, they will use the second value

I would prefer that over a server 25+ only nc/vue release.

@raimund-schluessler
Copy link
Contributor

The fallback works, but could we maybe adjust the value of --color-primary-element-light to the one of server 25+ so it doesn't look weird in the docs.

@GretaD GretaD requested a review from skjnldsv August 26, 2022 09:32
@raimund-schluessler
Copy link
Contributor

raimund-schluessler commented Aug 26, 2022

Sorry to bother everyone again, but using these adjustments on a server running NC 24.0.4 this is the result:

  • with primary color 575757:
    Screenshot 2022-08-26 at 11-30-19 Aufgaben - Nextcloud
  • and with default one 0082C9:
    Screenshot 2022-08-26 at 11-34-43 Aufgaben - Nextcloud

So, I think this fallback still does not work, because --color-primary-element-light seems to exist for NC 24 already.

@GretaD
Copy link
Contributor Author

GretaD commented Aug 26, 2022

Sorry to bother everyone again, but using these adjustments on a server running NC 24.0.4 this is the result:

  • with primary color 575757:
    Screenshot 2022-08-26 at 11-30-19 Aufgaben - Nextcloud
  • and with default one 0082C9:
    Screenshot 2022-08-26 at 11-34-43 Aufgaben - Nextcloud

So, I think this fallback still does not work, because --color-primary-element-light seems to exist for NC 24 already.

no sorry, thank you for checking it so carefully.
@juliushaertl should we rename --color-primary-element-light to --color-nc-primary-element-light on your pr here: https://github.com/nextcloud/server/pull/33641/files ? i can do the change, just to confirm

@skjnldsv
Copy link
Contributor

I think this fallback still does not work

Yep, it only works if you add a new css variable, which I thought y'all were doing for 25 :)

@GretaD
Copy link
Contributor Author

GretaD commented Aug 26, 2022

Yep, it only works if you add a new css variable, which I thought y'all were doing for 25 :)

so what do you propose instead of --color-nc-primary-element-light?

Signed-off-by: greta <gretadoci@gmail.com>
@GretaD GretaD force-pushed the feature/counter-colour branch from 13c9741 to 5ec5cd4 Compare August 26, 2022 13:40
@juliusknorr
Copy link
Contributor

For reference in the comments as well, we can use -lighter here as the default and fallback to -light, as lighter is no longer present on the new nextcloud release then and the old -lighter color is close enough to the new one.

Copy link
Contributor

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

My only remark is that color is spelled without a u

@GretaD GretaD merged commit ce06979 into master Aug 26, 2022
@GretaD GretaD deleted the feature/counter-colour branch August 26, 2022 14:00
@ChristophWurst ChristophWurst removed the breaking PR that requires a new major version label Aug 30, 2022
@ChristophWurst
Copy link
Contributor

With the help of the fallback this is no longer a breaking change, right?

@juliusknorr
Copy link
Contributor

Yes.

@nickvergessen
Copy link
Contributor

nickvergessen commented Sep 14, 2022

This totally breaks as shown on the screenshots above.

In talk the unread counter for mentioned and unmentioned almost look the same apart from the broken font color that doesn't have enough contrast

Bildschirmfoto vom 2022-09-14 09-31-00

If you need a "primary" unread counter, you need to specify the type="highlighted" on NcCounterBubble
If you use it via NcListItem like Talk, the primary unread counter is available counterType="highlighted"

Can we revert this?

@ChristophWurst
Copy link
Contributor

Only an issue with dark theme and highlighted counters -> #3249

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews design Design, UX, interface and interaction design
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3️⃣2️⃣1️⃣ Colored app navigation counter
6 participants