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

Rich text editor | Fix nested list highlighting #1462

Merged
merged 11 commits into from
Sep 1, 2023

Conversation

saikrishnan-ni
Copy link
Contributor

@saikrishnan-ni saikrishnan-ni commented Aug 29, 2023

Pull Request

🤨 Rationale

Fixes #1434

  • This PR fixes the behavior of list buttons in case of having nested lists. Previously for nested lists, the list buttons used to get highlighted based all all the tags preceding it.
    image
  • With this change only the list item based on last tag will get highlighted
    image

👩‍💻 Implementation

  • Used findParentNode method from tiptap/core to find the current node type
  • Highlight the list button only based on current node type

🧪 Testing

  • Added unit test for testing this use case

✅ Checklist

  • I have updated the project documentation to reflect my changes or determined no changes are needed.

@vikisekarNI vikisekarNI requested a review from m-akinc August 29, 2023 08:48
Signed-off-by: Sai krishnan Perumal <[email protected]>
@saikrishnan-ni saikrishnan-ni marked this pull request as ready for review August 30, 2023 05:08
Signed-off-by: Sai krishnan Perumal <[email protected]>
@saikrishnan-ni saikrishnan-ni enabled auto-merge (squash) September 1, 2023 04:53
Signed-off-by: Sai krishnan Perumal <[email protected]>
@saikrishnan-ni saikrishnan-ni merged commit 903a5d2 into main Sep 1, 2023
@saikrishnan-ni saikrishnan-ni deleted the editor-toggle-button-fix branch September 1, 2023 05:35
rajsite pushed a commit that referenced this pull request Sep 7, 2023
…l behavior (#1481)

# Pull Request

## 🤨 Rationale

- Resolves #1473, where different
type of list element is possible to be added in same level.
It can be reproduced using the steps from
#1462 (comment)

## 👩‍💻 Implementation

- Added unit and ui test for the possibility of having different type of
list element in same level

## 🧪 Testing

- Added unit and ui testing

## ✅ Checklist

<!--- Review the list and put an x in the boxes that apply or ~~strike
through~~ around items that don't (along with an explanation). -->

- [x] I have updated the project documentation to reflect my changes or
determined no changes are needed.

---------

Signed-off-by: Sai krishnan Perumal <[email protected]>
Signed-off-by: Sai krishnan Perumal <[email protected]>
Co-authored-by: m-akinc <[email protected]>
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.

Rich Text Editor | Support for correct highlighting in nested list nodes
5 participants