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

feat(elements|ino-markdown-editor): edit links after inserting them #1024

Merged
merged 24 commits into from
Oct 13, 2023

Conversation

BingeCode
Copy link
Collaborator

@BingeCode BingeCode commented Jul 19, 2023

Closes #981 and #1060

Proposed Changes

  • Added a editing dialog for inserting, editing and deleting links.

Optional tweaks

  • Autofocus text input when dialog opens
    Autofocus is tricky, because it requires a rework of how we implement the dialog. The current implementation (with Material Dialog) tries to control focus. When programmatically changing focus, the dialog retakes control. I tried setting focus on the input using the autofocus attribute on ino-dialog, setting it programmatically at the end of the event loop (Promise.resolve().then(() => element.focus());) and setting it with timeout (setTimeout(() => element.focus(), 100); ). It didn't work.

  • Auto submit on enter
    Auto submit likewise is tricky because it requires working with shadow DOM, attaching event listeners to the input in the shadow dom and managing event configuration. For such a small use case it is not worth the trouble to get this to work.

Bildschirmaufnahme.2023-10-07.um.16.43.52.mov

@BingeCode BingeCode temporarily deployed to github-pages July 19, 2023 14:13 — with GitHub Actions Inactive
@BingeCode BingeCode temporarily deployed to github-pages August 30, 2023 12:41 — with GitHub Actions Inactive
@BingeCode BingeCode temporarily deployed to github-pages September 4, 2023 12:09 — with GitHub Actions Inactive
@BingeCode BingeCode changed the title Elements ino markdown editor link fix fix(elements): markdown editor link dialogue Sep 4, 2023
@BingeCode BingeCode temporarily deployed to github-pages September 4, 2023 15:27 — with GitHub Actions Inactive
@BingeCode BingeCode marked this pull request as ready for review September 4, 2023 20:35
Copy link
Collaborator

@janivo janivo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice job overall but I'm not sure if the dialog is the right solution in the end. Have a look at my remarks. What do you think?

janivo
janivo previously approved these changes Sep 28, 2023
@janivo janivo enabled auto-merge (squash) September 28, 2023 15:43
janivo
janivo previously approved these changes Sep 28, 2023
@BingeCode BingeCode requested a review from janivo October 4, 2023 14:32
@BingeCode BingeCode temporarily deployed to github-pages October 6, 2023 09:46 — with GitHub Actions Inactive
@BingeCode BingeCode temporarily deployed to github-pages October 6, 2023 10:37 — with GitHub Actions Inactive
@BingeCode BingeCode temporarily deployed to github-pages October 6, 2023 11:59 — with GitHub Actions Inactive
janivo
janivo previously approved these changes Oct 13, 2023
@janivo janivo changed the title fix(elements): markdown editor link dialogue feat(elements|ino-markdown-editor): edit links after inserting them Oct 13, 2023
@janivo janivo merged commit 1efec20 into master Oct 13, 2023
5 of 6 checks passed
@janivo janivo deleted the elements-ino-markdown-editor-link-fix branch October 13, 2023 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ino-markdown-editor: Link-Button is not working
2 participants