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

Enh/preview links #5399

Merged
merged 12 commits into from
Mar 7, 2024
Merged

Enh/preview links #5399

merged 12 commits into from
Mar 7, 2024

Conversation

max-nextcloud
Copy link
Collaborator

@max-nextcloud max-nextcloud commented Feb 20, 2024

📝 Summary

🖼️ Screenshots (wip)

Bildschirmaufzeichnung.vom.20.02.2024.12.23.34.webm

🚧 TODO

  • allow turning the preview back into a link
  • make it work on more than the first line
  • squash commits in meaningful way.
  • allow converting a link followed by whitespace into a preview
  • fix backspace when cursor is right after the preview
  • close bubble when opening menu
  • close menu when opening bubble
  • edit link target from menu

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • Documentation (README or documentation) has been updated or is not required

@juliushaertl
Copy link
Member

Had a first quick code read and looks very reasonable from the implementation approach 💪 - will check in further detail once you request review

Use title attribute to mark previews in markdown.

Introduce PreviewOptions component
to add preview options for isolated links.
If there's just one link in a paragraph
you can turn it into a preview.

Signed-off-by: Max <[email protected]>
They actually need to do different things
due to the different structure.

On the one hand we have the preview node
with plain text content.
And on the other hand a paragraph node
with the text wrapped in a link mark.

Signed-off-by: Max <[email protected]>
max-nextcloud and others added 2 commits March 6, 2024 19:08
They convert the node without changing the content
resulting in an endless loop.

Signed-off-by: Max <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
@juliushaertl juliushaertl added enhancement New feature or request 3. to review labels Mar 7, 2024
@juliushaertl juliushaertl added this to the Nextcloud 29 milestone Mar 7, 2024
@juliushaertl
Copy link
Member

Pushed a small fix for eslint

@juliushaertl juliushaertl merged commit b5e9ce2 into main Mar 7, 2024
56 of 58 checks passed
@juliushaertl juliushaertl deleted the enh/preview-links branch March 7, 2024 07:18
@juliushaertl juliushaertl mentioned this pull request Mar 7, 2024
11 tasks
@juliushaertl
Copy link
Member

Filed follow ups as #5442

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nodes for embedding / previewing content
2 participants