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

Richtexteditor formats #141

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Open

Commits on Jul 4, 2024

  1. feat(quill): make it easier to put cursor at the start of lines

    Paragraph symbols were catching clicks.
    fbessou committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    285ba61 View commit details
    Browse the repository at this point in the history
  2. fix(quill): keep notes in document flow by making them inline

    When inline-block, a second cursor `slot` is created after the note node.
    fbessou committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    2be8784 View commit details
    Browse the repository at this point in the history
  3. refactor(DocumentNotes): Make deleting notes safer

    By not relying on regexps and by using DOM queries instead.
    fbessou committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    b79dfef View commit details
    Browse the repository at this point in the history
  4. refactor(NoteActions): Make removing notes form note modal safer

    There is code duplication between this and DocumentNotes.
    fbessou committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    3f998f6 View commit details
    Browse the repository at this point in the history
  5. feat(Modal): make Modals accept html

    Otherwise titles containing fa icons are not rendered.
    fbessou committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    c3c7ef2 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2a647cc View commit details
    Browse the repository at this point in the history
  7. feat: ensure notes and page break are stored as embed blots and simpl…

    …ify keyboard navigation
    
    There is a lot of stuff in there.
    
    Main changes:
    
    RichTextEditor is now initialized with its initial value props. After
    that, it is not controlled and only sends its new value to its parent
    component in the hierarchy.
    
    NoteForm is updated so that the first time it is rendered, the
    RichTextEditor value props is already defined. Before this change, the
    editor was populated on second render, after the call to the mounted
    lifecycle hook.
    
    Components that take input data as propse now expect a single data
    structure as prop. For example, NoteForm `inputData` prop could be
    either {note: {id: number}} or {formats: {note: {id: number}}, leading
    to big conditionals.
    
    A lot of imperative logic is transformed into more functional logic by
    using computed component state. This is the case for example for the
    way the "activeness" of the buttons is computed. We remove the
    `updateButtons` method from the RichTextEditor and instead compute the
    buttons availability from the component's current state on render.
    
    Notes and Page breaks are transformed into embeds to avoid hard to
    maintain logic to ensure that their inner text are not modified.
    This allow us to write specific keyboard and mouse handlers for these
    elements the embeds are selected on click ot when navigating over them
    with keyboard.
    
    A new `remove format` button is added in the RichTextEditor which allows
    to ensure that the text going to be typed will not be formatted. A new
    icon should be chosen for this button as it is currently the same as
    "stroked text"/"del" button.
    fbessou committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    e781bdb View commit details
    Browse the repository at this point in the history