-
Notifications
You must be signed in to change notification settings - Fork 58
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
Port Verse block to mobile #1886
Comments
Verse Block vs. Paragraph Block on Gutenberg WebWhen porting verse block features from web to mobile, this feature list may be useful to a) enumerate verse block features on web, b) compare the verse and paragraph blocks on the web to help leverage existing code at implementation time, and c) open discussion about which features of the verse block will be ported to mobile and which will be left out.
Other ConsiderationsUse cases for the verse block include quoting poetry and song lyrics. Pasting content through the device clipboard should be considered a likely scenario. |
@guarani Thanks for jumping on this block! Stoked to see we're on it 😄 I took a look at how the web handles design/styling, and it largely depends on the active theme style. Using Twenty Twenty themeStyled similarly to Preformatted block. Using Maywood themeStyled like a Paragraph, but with additional padding. Using Twenty NineteenStyled like a paragraph, no additional padding. ProposalIn terms of styling, I propose that we should follow the Twenty Nineteen model. In other words:
|
Thanks for looking at the design, @iamthomasbishop! On a slightly different topic, I noticed that when shown in the Reader, the verse block is just shown as pre-formatted text. My feeling is that this will be handled in a separate issue – and in the WordPress for iOS/Android repo – but would like to hear others' opinions.
|
That’s a good reminder regarding Reader, @guarani! We should sync at some point with the other team that has Reader things in the apps in their view (perhaps @frosty can advise 🙂). In terms of Reader styling, I’d suggest the Verse should look the same as I suggested for the editor (similar to paragraph — same font, size, no bg/padding, etc.), whereas code and pre should look similar to each other. |
Thanks for the ping! I think this definitely belongs in the iOS / Android repos – @guarani please could you open some issues for this? |
Adding Verse Block DemoHere are some screenshots of the verse block running on iOS and Android.
Current State of Verse Block Support on MobileHere are the results of testing each of the features of the verse block on mobile. Next StepsCan UI for following features – while implemented on the web – be left out of scope on mobile? These are things that seem to be not generally supported on mobile at the moment.
I also propose:
Regarding hyperlinks, I have not yet been able to test them in the Gutenberg demo app (through the simulators) because the link options (URL, Link text, new tab option) are not appearing, neither for the verse block nor the paragraph block. I'll have to dig further by testing locally through the WordPress native apps. @hypest, @iamthomasbishop – does this all sound ok to you? I could start with text alignment and move from there. |
I think they can be left out for this iteration, yes. Thanks for the update! |
Coming back to this issue, I was looking at the example above that shows indented lines, and it made me wonder if we should show Note: We could also do this for the Code block as well (esp. if we want to weigh in on the tabs vs. spaces debate 😜). |
That's interesting, it hadn't occurred to me. If the indent/outdent button worked not only on single lines, but also on multi-line text selections, I think that would be really useful. I agree this that indenting is a really useful feature for the code block. |
I noticed some weird behavior when adding new lines and quickly typing that I think we should follow-up on before removing the dev flag on the block. On Android, I see disappearing letters/words. iOS has that as well but also has seems to sometimes move characters and even have some new characters show up unexpectedly. I found it a bit tricky to reproduce this on WPiOS and Android debug builds (I didn't check a release build). On the Android demo app, however, the issue is relatively easy to reproduce. UPDATE: I do not think this issue is tied to the verse block specifically, I also see similar behavior on the preformatted and list blocks. In light of that, I've opened a new issue to track this. |
From #1886 (comment)
I've broken this out into a separate bug issue with more context as it affects all blocks, not just the verse block. See #1966 |
Regarding styling (#1886 (comment)):
I want to use the exact same styles as the paragraph block, but from what I'm seeing, the paragraph block's styling on mobile is by virtue of it using the As a test, I changed the verse block to use a I could just try to play with the scss properties to make it visually match the paragraph block, or take a deep dive into Aztec to see what styling it's putting on |
A quick note: On the mobile ports of the blocks, we never actually change the output markup of the block. In other words, we never need to change the |
|
Aha, that's good news 😄 . Ofc, having the PRE block look exactly like the paragraph is not desirable since the PRE should have a monospace font. I've opened a ticket for it #2081. |
@iamthomasbishop, after discussion with @hypest and @SergioEstevao, the "fix" i mentioned above in #1886 (comment) is no longer the case. The verse block uses a The proposal we considered is to leave the style of the verse block alone for now and address it at a later stage. What do you think @iamthomasbishop ? |
Update to the above comment: we're also proposing leaving the "Bolding text using the toolbar causes whitespace to be lost" subtask out for now, so we can unblock the release of the Verse block which is still only available on development/debug builds. |
@guarani Apologies on the delay. I hope I'm understanding the issue properly. Is there anything we can latch onto that allows us to style the verse variation of
That sounds like a bug that we should fix prior to shipping the block, no? |
Echoing Thomas above, the whitespace removal seems like a blocker for un-DEVing the block. What's the context behind the thought to not block on that issue? |
It's my understanding that we want to give it a non-monospace font, as per your comment here: #1886 (comment). Please let me know if there's been a misunderstanding.
My reasoning is that since this is an existing bug in production (I'm not sure if I made that clear earlier), it's not specific to the verse block and equally affects any other rich text (e.g. pre-formatted and paragraph blocks). This doesn't mean it's not a good time to fix this bug now. Perhaps users of the verse block use styled and indented (leading whitespace) content more often than users of the pre-formatted or paragraph block. |
Ack yes, you’re right, I had it reversed 🤦♂
Ok, that makes sense. I’d like to fix asap and pause shipping unless this fix will take a long time — in which case we can tackle separately.
I’m not sure — purely an assumption, but I’d assume indentation would probably also be common on the |
No worries – I'm doing a bit more debugging on this and will write up my findings on the subissue in question, #1966. I'll ping you here once that's done 👍. |
@iamthomasbishop, sorry to go back to what we were discussing earlier. |
I think it's acceptable, but hoping we can iterate on it quickly and apply the expected serif font. |
Related GitHub report: Code & SyntaxHighlighting Blocks: Indent / Outdent Option |
👋 @guarani ! Should we close this issue (and maybe creating new issues for things like indentation) or do you think we would be better off leaving this issue open? |
This was mostly for tracking the effort needed to ship the first block, so I agree we could close this and add issues for the pending items. I'll do this soon, thanks for flagging this 👍 |
I created a separate issue to track the work that needs to be done to style the verse block like a paragraph block: WordPress/gutenberg#30836 The other non-blockers here all have their own issues already so I think this is safe to close. |
Description
The aim of this task is to implement the verse block on the mobile Gutenberg editor. The verse block is characterized by its support for line-breaks and ability to render arbitrary whitespace.
Considerations
The features to implement on mobile may be a subset of those found in Gutenberg web.
Subtasks
The subtasks that make up the verse block port are divided into those that are blocking, non-blocking, and undecided (still under investigation).
Blocking
devOnly
flagNon-blocking
<br>
tags for new lines in pre-based blocksAdditional Information
Support verse blocks in the Reader wordpress-mobile/WordPress-Android#11299, wordpress-mobile/WordPress-iOS#13452 (these are not Gutenberg per se, just tracking their progress here)
The text was updated successfully, but these errors were encountered: