-
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
Support for links in RichText #221
Comments
I've already done some explorations of this, utilizing the bottom sheet pattern combined with elements from the existing dialog/table view. It looks like this (iOS): |
I spent some time looking at this, so I'm making some notes of what I know so far. First, I tried the solution that was closer to Gutenberg by using The quick solution seemed like reusing whatever the apps have in place, but looking at The intermediate solution is to build the link settings UI in JavaScript (so we're closer to doing it the right way), but let RichText handle it instead of format-library. This seemed reasonable, but it requires some changes to how Aztec communicates with Gutenberg. Currently, changing formats is oversimplified and you can only tell Aztec to toggle a format (bold, italic, ...) in the selected text, but a link it's not just something you toggle, you need to pass the URL (and other options). This would require changing the protocol with which Gutenberg communicates format changes to Aztec, or expose the selected text range to RN and dealing with the format operations there (closer to the desired state). I tried the second one, but I think I hit some RN oddities when I added a new |
Another update. I managed to make the format-library work in #275, although it's not working great. When it works, it only does so for selected text, not for changing the format as you type. The reason for this is that I started thinking of an approach where we could just feed the changed record to aztec, but it sounds really hard an in the wrong direction, so I'm thinking the next goods step might be trying to make jsdom OK with that. Other than that, we still have to build the whole link editing UI: if you tap the link button now it'll crash |
As discussed in Slack:
|
Assigning this issue to me as well for tracking purposes since I'll now be checking the iOS side of it. |
Removing my assignment for now as I don't currently have any pending tasks on this. Also my work was limited to reviewing existing PRs. Let me know if there's more that needs to be done. |
We currently have basic styling options but we don't support adding and editing links yet.
For reference, here's how adding a link looks in Aztec:
And how the add/edit UI looks on the web:
I think for the alpha we could do with the simpler approach we can implement (a dialog) but we should do some design explorations for the beta. I'm not sure the existing floating UI that we have on the web will work great on mobile. cc @iamthomasbishop
The text was updated successfully, but these errors were encountered: