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

BUGFIX: fix hover on toggle icon not changing color to blue, add hove… #3619

Closed
wants to merge 1 commit into from

Conversation

Devclaim
Copy link
Contributor

@Devclaim Devclaim commented Sep 16, 2023

What I did

Problem 1: Hover States

Looking at the CSS it looks as if the toggle button of a node in the Content and Page NodeTrees is supposed to change their color to blue when hovering over them.

While at it I also replicated the behavior from the top left burger menu. The Label and the icon now appear blue when they are either hovered over or selected (While selected the grey Background is still present).

Problem 2: Collapsing all children

Since I am new to Reselect I wasn't able to create a new selector to get all descendants of a node. Also I didn't want to break anything accidentally. Instead I added the function to optionally collapse the children of a node by shift-clicking the toggle icon of a node.

Problem 3: Make it easier to drop a node into a dropTarget

How I did it

Problem 1: Hover States

  • Styles are now applied to the toggle SVG
  • Added a hover state to the nodes

Problem 2: Collapsing all children

  1. The toggle action now has more arguments

    • collapseChildren: boolean true if the shift key is pressed on the click event
    • childrenContextPaths: NodeContextPath[] the context paths of all children of the clicked node
      • children that cant be toggled are filtered out
      • checks if children are loaded at all
    • childrenCollapsedByDefault: boolean
      • checks if children are collapsedbydefault (unlike a normal node these nodes must be removed from the redux store to be appear collapsed
  2. To integrate a simple collapse all button the toggle buttons could be selected and the click events could be fired including the shiftKey event via simple JS. I wonder if a solution like this would be up to the standards? Since the redux actions would be fired, I don't think it would create any unwanted side effects.

Problem 3: Make it easier to drop a node into a dropTarget

I added extra height to the dropTarget but only after a node is already being dragged.

How to verify it

Before: No hover effects

After:
New Hover Effects and collapsing children nodes in action:

2023-09-17 01-44-48

…r effect for nodes in nodeTress, add function to collapse childrens of node via shift press on toggle icon
@github-actions github-actions bot added Bug Label to mark the change as bugfix 8.3 labels Sep 16, 2023
@crydotsnake
Copy link
Member

Hello @Devclaim

Thanks for your pull request!

Since this is BUGFIX PR it needs to be opened against the 7.3 branch. Because the 7.3 LTS gets bugfix updates until december 2023.

Checkout our roadmap for more informations.

@Devclaim
Copy link
Contributor Author

Devclaim commented Oct 8, 2023

Hello, sorry I did not have that in mind. I opened a PR for 7.3 here: #3635 . Luckily it's almost the exact same PR, only the name of the css file is different in the 7.3 branch. Do I close this PR now? I am not sure what happens next and how the changes -if accepted- make it into the 8.3 branch.

@markusguenther
Copy link
Member

Guess we can close this as a duplicate of #3635
Thanks for your work 💙

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.3 Bug Label to mark the change as bugfix Wrong Branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants