-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[RNMobile] Add mobile Spacer component #17896
Conversation
7d00bf4
to
e3f4107
Compare
e3f4107
to
54d005d
Compare
@koke I've extracted logic to EDIT: Maybe we don't need a Also after the refactor I was not able to reproduce that 'jiggly' behaviour. |
3129e13
to
a1d9a10
Compare
6ccd608
to
833cc76
Compare
@lukewalczak Looks nice in the updated screenshots, thanks for wrangling those changes!
Just want to confirm, this is only on dark mode, correct?
This looks better, but can we remove the trailing separator on the last table row?
This is great! Does this also get an Android equivalent? Two more things, neither of which are blockers:
|
That looks like what I had in mind, but for some reason I thought the Slider part had some more custom behavior than adding the input. |
@koke Do you think we can accept the structure as it is right now? |
@iamthomasbishop I've updated PR description and added Android screenshots 🎉
Correct ✅
Sure!
Generally, that issue will be fix within styling issue, but honestly I'm all for doing it within in this PR. Just let me know if you are ok with that ✌️. |
@lukewalczak Ah ok, either way is fine by me although the sooner the better 😄 |
c5c36a7
to
afdfb24
Compare
afdfb24
to
74d020a
Compare
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.
Thank you for the improvements @lukewalczak !
I gave it a try with VoiceOver on device (iPhone X), and double-tapping on the cell didn't focus the slider. Did a bit of debugging and I noticed that onCellPress
is not being called.
It is called when I tap on it normally, but it won't with VoiceOver.
About: #17896 (comment)
What I wanted to achieve here is to make the parent component (Cell) not accessible, since I want to focus Slider and have also TextInput accessible as well.
That sounds good! It's the approach we follow on other blocks too 👍
Wdyt about having there only one component when screen reader is enabled?
Could you please expand a bit? Do you mean having only slider?
If that's the case, wouldn't auto-focusing the slider be enough and simpler?
Both platforms are reading the slider value in percents, e.g. 100 px is is read as 17 percents.
True that, and it's probably not a good thing in this case. Since 10% can mean different thing on different situations, and in this case, there's no visual help for the user. I think it's best if we can let them know the precise height amount.
A good example is the Music app. It has the the Volume scroller that says its value on percent, and there's the track position scroller. Since songs has different lengths, it won't make much sense to say percents there, so they say the current time together with the total time of the song while dragging it.
If this is blocking other work, I'm happy to ✅ as it is and improve these details separately.
Everything else looks great to me! 🎉
Thank you again!
@etoledom Thanks for feedback! I was testing accessibility on iPhone 7, so will dive into the issue on iPhoneX.
I'm not sure what can I do in that matter. Probably I can inform user about current value when user releases the finger / changing a value, however voice over will also pass the info in percents. |
@etoledom Could you please re-test it? 🙏 |
37f83e8
to
1debc8c
Compare
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.
Accessibility on iOS is working better now. Thanks @lukewalczak for the update!
I added a small code comment, but overall looks good to me 🎉
Great job 🙏
packages/components/src/mobile/bottom-sheet/range-cell.native.js
Outdated
Show resolved
Hide resolved
…rnmobile/gb-mobile-872-JSApplicationIllegalArgumentException-in-RCTAztecView * 'master' of https://github.com/WordPress/gutenberg: (56 commits) Update: Default gradients. (#18214) Fix: setting a preset color on pullquote default style makes the block invalid (#18194) Fix default featured image size (#15844) Fix postmeta radio regression. (#18183) Components: Switch screen-reader-text to VisuallyHidden (#18165) [rnmobile] Release 1.16.0 to master (#18261) Template Loader: Add theme block template resolution. (#18247) Add a README file for storybook directory (#18245) Add editor-gradient-presets to get_theme_support (#17841) Add "Image Title Attribute" as an editable attribute on the image block (#11070) enables horizontal movers in social blocks (#18234) [RNMobile] Add mobile Spacer component (#17896) Add experimental `ResponsiveBlockControl` component (#16790) Fix mover for floats. (#18230) Rename Component to WPComponent in docstring (#18226) Colors Selector: replace `Aa` text by SVG icon (#18222) Removed gif from README (#18200) makes the submenu items stacked vertically (#18221) Add block navigator to sidebar panel for nav block (#18202) Fix: consecutive updates may trigger a blocks reset (#18219) ...
Description
Ref to gb-mobile: wordpress-mobile/gutenberg-mobile#1436
Fixes: wordpress-mobile/gutenberg-mobile#1428
NOTE: That PR requires
RangeControl
mobile component -> #17282 to control spacer height using slider.That PR adds a mobile
Spacer
component.UPDATES:
Implemented Accessibility - double press on
Cell
is focusing theSlider
once screen reader is enabledCorrected dark more check the screenshot
Typing a value works properly check the gif
Styling changes according to @iamthomasbishop comment:
done
buttoniOS: Screenshot one and two
Android: Screenshot one and two.
Fix focusing slider when VO is ON on iPhoneX
Add an information for VO about current value when changing value
How has this been tested?
Spacer
component.Spacer
heightScreenshots
NOTE: On the gifs there is a wrong label
Slider
instead ofHeight in pixels
which is correct in the code.Types of changes
Checklist: