eui icon indicating copy to clipboard operation
eui copied to clipboard

Add ability to append any element on a EuiSideNav

Open cauemarcondes opened this issue 3 years ago • 3 comments

On APM we needed to add a new badge beside the label on the observability nav. More details here: https://github.com/elastic/kibana/issues/107718

Screen Shot 2021-08-12 at 16 13 46

Currently, there's no way to automatically add such a badge on EuiSideNav. I would like to have a new property called append where it would be rendered beside the label, and it should also automatically truncate the label if it is bigger than the container.

I did a workaround to have it for 7.15 here https://github.com/elastic/kibana/pull/108397/files#diff-4d1ad7a610ef7e1d1282f54948f8331f0fe9effeedd43ce5ce70370501e87549R52

cauemarcondes avatar Aug 12 '21 20:08 cauemarcondes

The biggest challenges with work arounds are with the hover states underlining the appended content and keeping truncation.

Our own implementation in Docs is messy too: https://github.com/elastic/eui/blob/036a89c46e4e05923491b62b1e51d361ca08d0ec/src-docs/src/components/guide_page/_guide_page.scss#L45-L64

cchaos avatar Aug 12 '21 20:08 cchaos

👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

github-actions[bot] avatar Feb 09 '22 00:02 github-actions[bot]

👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

github-actions[bot] avatar Aug 08 '22 16:08 github-actions[bot]

❌ We're automatically closing this issue due to lack of activity. Please comment if you feel this was done in error.

github-actions[bot] avatar Aug 16 '22 00:08 github-actions[bot]