Skip to content
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] Support setting anchors for all eligible blocks #28363

Closed
dcalhoun opened this issue Jan 20, 2021 · 1 comment · Fixed by #59802
Closed

[RNMobile] Support setting anchors for all eligible blocks #28363

dcalhoun opened this issue Jan 20, 2021 · 1 comment · Fixed by #59802
Assignees
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Type] Enhancement A suggestion for improvement.
Projects

Comments

@dcalhoun
Copy link
Member

dcalhoun commented Jan 20, 2021

What problem does this address?

The mobile block editor has limited support for setting anchors for blocks. #27935 provides support for setting anchors for Heading blocks, but ideally the mobile block editor allows setting anchors for all eligible blocks to align with the web block editor.

There appears to be...

25 Eligible Blocks
  • audio
  • button
  • buttons
  • code
  • column
  • columns
  • cover
  • file
  • gallery
  • group
  • heading
  • image
  • list
  • media-text
  • navigation
  • paragraph
  • preformatted
  • pullquote
  • quote
  • separator
  • social-links
  • spacer
  • table
  • verse
  • video

What is your proposed solution?

The work within #27935 leverages the relevant anchor hook, but scopes its application for mobile to only include Heading blocks. We could support all eligible blocks by removing the current scoping.

Additionally, we would need to apply an appropriate section heading above the HTML anchor text input. I see a few options for the section heading.

Option Description
(A) Generic Section Heading Change the existing section heading from "Heading settings" to "Advanced settings."
(B) Block-Specific Heading Update the section heading to be unique for the current block type (e.g. Pull quote settings, Image settings).
(C) Advanced Settings Panel Port the web's InspectorAdvancedControls component to native mobile. We would need to determine how this collapsible panel on the web should be presented within the mobile bottom sheet. I.e. should it collapse or present without collapse?

From my perspective, Option C makes the most sense, as it further aligns with the web block editor. There are also additional controls within the web's Advanced settings section that may one day be ported to native mobile as well.

@hypest hypest added the Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) label Jan 21, 2021
@hypest hypest added this to Triage in Mobile Apps via automation Jan 21, 2021
@hypest hypest moved this from Triage to To do in Mobile Apps Jan 21, 2021
@jordesign jordesign added the [Type] Enhancement A suggestion for improvement. label Aug 17, 2023
@derekblank
Copy link
Member

In reference to Option C above, just noting that since this issue was created, work was done to refactor the native implementation of InspectorAdvancedControls in #34069, which may make this implementation path easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Type] Enhancement A suggestion for improvement.
4 participants