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

Add hanging indent for lists in the note editor #402

Closed
wants to merge 1 commit into from

Conversation

colebemis
Copy link
Member

@colebemis colebemis commented 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.

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).
Copy link

netlify bot commented Aug 21, 2024

Deploy Preview for lumen-notes failed.

Name Link
🔨 Latest commit 9b9fe05
🔍 Latest deploy log https://app.netlify.com/sites/lumen-notes/deploys/66c537c32c67110008228dad

Copy link

netlify bot commented Aug 21, 2024

Deploy Preview for lumen-storybook ready!

Name Link
🔨 Latest commit 9b9fe05
🔍 Latest deploy log https://app.netlify.com/sites/lumen-storybook/deploys/66c537c3e8e75d0008fc9588
😎 Deploy Preview https://deploy-preview-402--lumen-storybook.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 configuration.

@colebemis colebemis closed this Sep 12, 2024
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.

Hanging indent for lists in the note editor
1 participant