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

**Fix:** Remove hasIconOffset, add <Example/> instead of <Example> #1344

Closed
wants to merge 2 commits into from

Conversation

rimildeyjsr
Copy link
Contributor

@rimildeyjsr rimildeyjsr commented Aug 1, 2020

Remove hasIconOffset property to fix the extra padding for trees with no children, removes misalignment
Use instead of to fix the warning in the code example

Fixes #1321

Summary

The last level of a nested tree was being misaligned with the previous level.

The cause was the hasIconOffset being set true for when you have an icon or a tag along with a tree that has no children. It was adding some extra padding using the formula paddingLeft + theme.space.element * level + (hasIconOffset ? theme.space.element : 0)}px;

On removing the hasIconOffset, the last levels get aligned with appropriate padding. I am removing this property altogether because any nested tree with no children was getting misaligned, and the property did not provide any other functionality.

Also, added arrows to the style of the freeze tree, as suggested in the issue

Related issue

Fixes #1321

To be tested

Me

  • No error or warning in the console on localhost:6060

Tester 1

  • Things look good on the demo.

Tester 2

  • Things look good on the demo.

Rimil Dey added 2 commits August 2, 2020 00:41
Remove hasIconOffset property to fix the extra padding for trees with no children, removes misalignment
Use <Example/> instead of <Example> to fix the warning in the code example

Fixes contiamo#1321
Add arrows for freeze tree by removing the condition preventing this
@mpotomin
Copy link
Contributor

Hi @rimildeyjsr! Looks like there is an issue with the columns still: columns are children of tables, but there is no indentation showing that (columns should be shown one level deeper under tables)
Screenshot 2020-08-12 at 09 03 41

Screenshot 2020-08-12 at 09 03 36

@rimildeyjsr
Copy link
Contributor Author

@mpotomin - Ah had not taken this into account, will fix this as well!

@fabien0102 fabien0102 closed this Dec 11, 2020
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.

4th level of tree nesting is misaligned with the parent
3 participants