fix: stop revealing elements on hover if hover is not supported #3191

Merged
konrad merged 4 commits from danstewart/vikunja-frontend:danstewart/fix-ios-double-tap into main 2023-03-04 16:13:33 +00:00
Contributor

Fixes #3162

A little clunky but works fine from my testing.

The only weird thing I've encountered is on mobile picking a list on the side menu doesn't auto collapse, but it's doing that on main so not related to these changes.

Fixes #3162 A little clunky but works fine from my testing. The only weird thing I've encountered is on mobile picking a list on the side menu doesn't auto collapse, but it's doing that on `main` so not related to these changes.
danstewart added 1 commit 2023-03-03 18:00:39 +00:00
continuous-integration/drone/pr Build is passing Details
da7ddbde27
fix: stop revealing elements on hover if hover is not supported
Fixes #3162
Member

Hi danstewart!

Thank you for creating a PR!

I've deployed the changes of this PR on a preview environment under this URL: https://3191-danstewart-fix-ios-double-tap--vikunja-frontend-preview.netlify.app

You can use this url to view the changes live and test them out.
You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/.

Have a nice day!

Beep boop, I'm a bot.

Hi danstewart! Thank you for creating a PR! I've deployed the changes of this PR on a preview environment under this URL: https://3191-danstewart-fix-ios-double-tap--vikunja-frontend-preview.netlify.app You can use this url to view the changes live and test them out. You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/. Have a nice day! > Beep boop, I'm a bot.
konrad reviewed 2023-03-03 20:02:26 +00:00
@ -350,2 +350,4 @@
opacity: 1;
}
@media(hover: hover) and (pointer: fine) {

How is the browser support for this?

How is the browser support for this?
Author
Contributor
Pretty good: https://caniuse.com/css-media-interaction

perfect

perfect
konrad marked this conversation as resolved
konrad reviewed 2023-03-03 21:15:44 +00:00
@ -162,3 +162,3 @@
.list-card:hover .favorite {
.list-card .favorite {
opacity: 1;

Aren't all the opacity: 1 statements outside the media queries now redundant?

Aren't all the `opacity: 1` statements outside the media queries now redundant?
Author
Contributor

Good catch, I was duplicating a few rules as I kept the original opacity: 0 then immediately set it back to opacity: 1.

I've removed the duplicates now.

Good catch, I was duplicating a few rules as I kept the original `opacity: 0` then immediately set it back to `opacity: 1`. I've removed the duplicates now.
konrad marked this conversation as resolved
danstewart added 1 commit 2023-03-03 21:29:52 +00:00
continuous-integration/drone/pr Build is passing Details
fe7cbfdc14
fix: reduce duplicate CSS rules
konrad requested changes 2023-03-03 21:38:43 +00:00
konrad left a comment
Owner

Looks like this now hides the favorite icons on desktop:

image

vs on try:

image

Looks like this now hides the favorite icons on desktop: ![image](/attachments/3bb3d8b2-2899-4929-a0c5-10112426e1cf) vs on [try](https://try.vikunja.io): ![image](/attachments/2976eddb-c1cf-4a2a-88a1-6a4e6fe1b285)
Author
Contributor

@konrad Odd, it works fine for me 🤔

Which browser and device are you using? I've tried on Chrome and Firefox.

@konrad Odd, it works fine for me 🤔 Which browser and device are you using? I've tried on Chrome and Firefox.
Owner

Tested in Firefox and Chromium on NixOS. Tested with the review link above.

The favorite icons only show up when hovering, not by default (as they do on try).

Tested in Firefox and Chromium on NixOS. Tested with the review link above. The favorite icons only show up when hovering, not by default (as they do on try).
danstewart added 1 commit 2023-03-03 22:18:28 +00:00
continuous-integration/drone/pr Build is passing Details
a4656b7f90
fix: always show is-favorite items
Author
Contributor

Sorry, I was being dumb.

Should be sorted now - thank you.

Sorry, I was being dumb. Should be sorted now - thank you.
konrad reviewed 2023-03-04 13:20:24 +00:00
@ -496,0 +506,4 @@
opacity: 1;
}
.list-menu:hover .favorite {

Can you unify these two rules to something like

.list-menu:hover .favorite,
.favorite.is-favorite {
	opacity: 1;
}
``
        
Can you unify these two rules to something like ```css .list-menu:hover .favorite, .favorite.is-favorite { opacity: 1; } ``
danstewart marked this conversation as resolved
@ -367,3 +363,2 @@
&:hover .handle {
opacity: 1;
@media(hover: hover) and (pointer: fine) {

same for unifying these rules here as well.

same for unifying these rules here as well.
danstewart marked this conversation as resolved
danstewart added 1 commit 2023-03-04 15:34:46 +00:00
continuous-integration/drone/pr Build is passing Details
79ed7bf6ce
fix: combine rules
danstewart requested review from konrad 2023-03-04 15:35:07 +00:00
Author
Contributor

Addressed those last two comments. 🙂

Addressed those last two comments. 🙂
konrad approved these changes 2023-03-04 16:12:54 +00:00
konrad left a comment
Owner

Thanks!

Thanks!
konrad merged commit 7b6f76d1b4 into main 2023-03-04 16:13:33 +00:00
konrad deleted branch danstewart/fix-ios-double-tap 2023-03-04 16:13:33 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.