-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
[front] feat: add buttons to compare criteria #1968
Conversation
… margin definition
frontend/src/index.css
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On iOS, the "overscroll" rule has no effect. It's necessary to add
html {
overscroll-behavior-y: none;
}
(if it has not undesirable effect on Android)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed by 2b6e534
import CriterionButtons, { BUTTON_SCORE_MAX } from './CriterionButtons'; | ||
import { useOrderedCriteria } from 'src/hooks/useOrderedCriteria'; | ||
|
||
const SWIPE_TIMEOUT = 240; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel the animation is a bit slow and frustrating when looking for a specific criterion. Why not using the same value as in the EntitySelector
?
const SWIPE_TIMEOUT = 240; | |
const SWIPE_TIMEOUT = 180; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed by e3bed73
With a9655a1 I added an icon in the list of comparisons to indicate whenever a comparison has been made on a mobile device. |
… should not trigger the slide animation
…h all criteria (#2024) * make 'next' buttons glow after has user has looped through all criteria * reduce padding of ContentHeader to gain some more vertical space * refactor: factorize behaviour of setHasLoopedThroughCriteria * fix: prevent accidental click on the criteria link * style: slightly faster glowing animation * ui: more understandable submit message on mobile --------- Co-authored-by: Gresille&Siffle <39056254+GresilleSiffle@users.noreply.github.com>
This reverts commit be54228.
related issues #1940
Description
This PR adds a new comparison method for mobile devices: buttons.
Features
How the front end chooses to display buttons or sliders?
If the displayed comparison has been previously made with buttons, the buttons are displayed. If it has been rated by sliders, sliders are displayed.
If the displayed comparison is new, the button are displayed for devices not matching the media query
(pointer:fine)
, and the sliders are displayed for all other devices (See the pointer media feature).No conversion from buttons to sliders and from sliders to buttons is allowed for now.
Future improvements
to-do
front end - tutorial
front end - buttons
front end - comparison input
score_max
of the main criterion is 2score_max
of the main criterion is 10score_max
between != criteriafront end - comparison scores review
front end - comparison
front end - coherence
Preview
A "mobile" comparison displayed on desktop:
Checklist