-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
base: main
Are you sure you want to change the base?
Conversation
… margin definition
The branch is now ready for review. I keep the PR in draft for now, because the back end is not yet ready to process comparisons with different |
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
related issues #1940
do not merge: the back end doesn't support comparisons with different
score_max
yetDescription
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