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

Hanging indent for lists in the note editor #347

Closed
colebemis opened this issue May 22, 2024 · 0 comments · Fixed by #408
Closed

Hanging indent for lists in the note editor #347

colebemis opened this issue May 22, 2024 · 0 comments · Fixed by #408
Labels
editor Related to the note editor up for grabs Open to contributions or assistance from the community

Comments

@colebemis
Copy link
Member

colebemis commented May 22, 2024

To improve readability in edit mode, the note editor should respect list indentation.

Bad

- Blah blah blah
blah blah blah
- Blah blah blah
blah blah blah

Good

- Blah blah blah
  blah blah blah
- Blah blah blah
  blah blah blah

References

@colebemis colebemis added editor Related to the note editor up for grabs Open to contributions or assistance from the community labels May 22, 2024
colebemis added a commit that referenced this issue Aug 21, 2024
Fixes #347

Implement hanging indent for lists in the note editor to improve readability.

* **Add `indentedLineWrap` plugin:**
  - Import `indentedLineWrap` in `src/components/note-editor.tsx`.
  - Add `indentedLineWrap` to the `extensions` array in `NoteEditor`.

* **Add CSS styles for indented wrapped lines:**
  - Add styles for `.indented-wrapped-line` in `src/styles/codemirror.css`.
  - Include margin-left and text-indent properties.
  - Add styles for active line and indent markers.

* **Create `indentedLineWrap` plugin:**
  - Add new file `src/utils/codemirror/indentedLineWrap.ts`.
  - Implement `indentedLineWrap` plugin to handle list indentation.
  - Define `getStartTabs` and `getDecorations` functions.
  - Use `StateField` to define the plugin.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace-dev.githubnext.com/lumen-notes/lumen/issues/347?shareId=XXXX-XXXX-XXXX-XXXX).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor Related to the note editor up for grabs Open to contributions or assistance from the community
Projects
Status: Done
1 participant