-
Notifications
You must be signed in to change notification settings - Fork 9
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BingeCode
temporarily deployed
to
github-pages
September 4, 2023 12:09
— with
GitHub Actions
Inactive
BingeCode
changed the title
Elements ino markdown editor link fix
fix(elements): markdown editor link dialogue
Sep 4, 2023
BingeCode
temporarily deployed
to
github-pages
September 4, 2023 15:27
— with
GitHub Actions
Inactive
janivo
requested changes
Sep 7, 2023
There was a problem hiding this 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?
packages/elements-angular/elements/src/directives/angular-component-lib/utils.ts
Outdated
Show resolved
Hide resolved
packages/elements/src/components/ino-markdown-editor/ino-markdown-editor.tsx
Outdated
Show resolved
Hide resolved
packages/elements/src/components/ino-markdown-editor/ino-markdown-editor.tsx
Show resolved
Hide resolved
packages/elements/src/components/ino-markdown-editor/ino-markdown-editor.tsx
Show resolved
Hide resolved
# Conflicts: # packages/elements/src/components/ino-markdown-editor/ino-markdown-editor.tsx
janivo
previously approved these changes
Sep 28, 2023
janivo
previously approved these changes
Sep 28, 2023
janivo
requested changes
Oct 11, 2023
janivo
previously approved these changes
Oct 13, 2023
janivo
approved these changes
Oct 13, 2023
janivo
changed the title
fix(elements): markdown editor link dialogue
feat(elements|ino-markdown-editor): edit links after inserting them
Oct 13, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #981 and #1060
Proposed Changes
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