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: inline some mentions to reduce spacing #1307

Merged
merged 2 commits into from
Jan 19, 2023
Merged

Conversation

patak-dev
Copy link
Member

Description

After #1293 (and 5785047), if you add a new mention in a conversation, a mention-group will be created only with it as the others are removed from the context. This could break the context, especially now that we edit with the grouped mentions so people may start using the initial handle as part of the text. But the main issue to me is that a mention-group that only has one or two handles ends up occupying more space extracted than inlined.

This PR lets mentions be inlined when only 1 or 2 remain to be shown and creates a mention-group when there are 3 or more.

Elk 0.5.0
image

Elk before this PR
image

After this PR
image

@stackblitz
Copy link

stackblitz bot commented Jan 18, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@patak-dev patak-dev requested a review from antfu January 18, 2023 23:43
@netlify
Copy link

netlify bot commented Jan 18, 2023

Deploy Preview for elk-zone ready!

Name Link
🔨 Latest commit 8df4851
🔍 Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/63c888cbd3ec0f00095fe4a1
😎 Deploy Preview https://deploy-preview-1307--elk-zone.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Jan 18, 2023

Deploy Preview for elk-docs canceled.

Name Link
🔨 Latest commit 8df4851
🔍 Latest deploy log https://app.netlify.com/sites/elk-docs/deploys/63c888cb226c3000086aa64c

@patak-dev patak-dev merged commit a48524e into main Jan 19, 2023
@patak-dev patak-dev deleted the feat/inline-some-mentions branch January 19, 2023 10:26
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.

1 participant