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

Make tabs flexible in code #4520

Merged
merged 3 commits into from
May 19, 2023
Merged

Make tabs flexible in code #4520

merged 3 commits into from
May 19, 2023

Conversation

zurfyx
Copy link
Member

@zurfyx zurfyx commented May 19, 2023

For some reason, I badly interpreted that tabs were hardcoded spaces in code in #4436.

This is not true for the popular code editors:

VSCode IntelliJ
https://github.com/facebook/lexical/assets/193447/82639889-381e-452f-b601-6002302b417f https://github.com/facebook/lexical/assets/193447/4293e185-9e74-4ea8-a0fa-8c5acdeb301a
Sublime CodeMirror
https://github.com/facebook/lexical/assets/193447/05755d67-a17f-42bd-ab3d-02dc9af9b7af https://github.com/facebook/lexical/assets/193447/311abb3a-8e5f-40e7-8806-5553ade0d6b5

So the new behavior in Code resembles outside copy and the editors above (tab-size can still be adjusted separately with CSS tab-size)

Screen.Recording.2023-05-19.at.10.16.16.AM.mov

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 19, 2023
@vercel
Copy link

vercel bot commented May 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 19, 2023 3:20pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 19, 2023 3:20pm

@github-actions
Copy link

github-actions bot commented May 19, 2023

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
packages/lexical/dist/Lexical.js 27.25 KB (0%) 546 ms (0%) 250 ms (-9.06% 🔽) 795 ms
packages/lexical-rich-text/dist/LexicalRichText.js 38.2 KB (0%) 765 ms (0%) 493 ms (+25.49% 🔺) 1.3 s
packages/lexical-plain-text/dist/LexicalPlainText.js 38.18 KB (0%) 764 ms (0%) 318 ms (+13.21% 🔺) 1.1 s

@@ -101,6 +101,7 @@
margin-bottom: 8px;
overflow-x: auto;
position: relative;
tab-size: 4;
Copy link
Contributor

Choose a reason for hiding this comment

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

image

Copy link
Member Author

Choose a reason for hiding this comment

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

.. or I can make 2 I guess 👀

@zurfyx zurfyx merged commit 665ed38 into main May 19, 2023
36 of 43 checks passed
@zurfyx zurfyx deleted the tab-again branch May 19, 2023 15:19
vuamitom pushed a commit to bitbriks/lexical that referenced this pull request May 19, 2023
This was referenced May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants