Git Product home page Git Product logo

Comments (5)

mstergianis avatar mstergianis commented on July 17, 2024

Any movement on this?

from core.

ashleyryan avatar ashleyryan commented on July 17, 2024

Hi, yes, @lil-kim did some investigation work on the design side and discovered the issue is much more complex than simply fixing the alignment of the icon.

For example, if you have nested grouping with icons and collapse the navigation, the alignment is such that you can still tell which icons are children of other icons:

image

Long story short - this component is still in beta and we've realized we have much work to do on it to get the experience correct - especially once we start considering other breakpoints besides desktop, which this beta component does not do.

As a workaround, you can apply a margin to the icon to center align it, here is a stackblitz:

cds-navigation-item cds-icon {
  margin-left: var(--cds-global-space-5);
}

from core.

mstergianis avatar mstergianis commented on July 17, 2024

Excellent thanks @ashleyryan for the update.

from core.

tmegan1 avatar tmegan1 commented on July 17, 2024

Thanks for the update, @ashleyryan!

We don't currently have any nested items in our nav bar so I didn't even notice what was going on with those secondary labels/icons.

There is some angular documentation on clarity.design that seems to resolve this by only applying icons to the top level navigation items (I think this helps keep visual clutter to a minimum as well). Though not as clearly illustrated, it also looks like, if a collapsed top level item with a carrot is clicked, the nav bar expands to reveal secondary items.

image

That workaround should be sufficient for now though. Thanks!

from core.

ashleyryan avatar ashleyryan commented on July 17, 2024

That documentation is for the older clr/angular component, it doesn't necessarily apply to the newer Core component - though as we update the component we may bring some of that in.

from core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.