Giter VIP home page Giter VIP logo

Comments (11)

joshblack avatar joshblack commented on April 28, 2024 2

Thanks for making this issue @maximedegreve!

Just wanted to leave a note that I believe the "ActionMenu positioning" section has a corresponding issue over at: #4059

from react.

siddharthkp avatar siddharthkp commented on April 28, 2024 1

@broccolinisoup πŸ‘‹ Assigning to you and me (FR) to do the initial triage.

from react.

siddharthkp avatar siddharthkp commented on April 28, 2024

There is a missing prop to remove the extra padding on the left of this component as it would provide better alignment with the content below when not used in the navigation.

Ideally, there shouldn't be any padding around the component by default? It should be left to the user to align πŸ€”

from react.

siddharthkp avatar siddharthkp commented on April 28, 2024

@broccolinisoup, this is the winning combination for consistently reproducing early truncation:

const children = ['Trending this week', 'Recently added']
losing-combo.mov

from react.

broccolinisoup avatar broccolinisoup commented on April 28, 2024

Hi folks πŸ‘‹ @maximedegreve @siddharthkp

Regarding the early truncation, it was an accessibility improvement that we made sure there is at least two elements in the overflow menu if we are going to display a menu - see the PR that we introduced this behaviour #2471 We can maybe look into other variants like condense or something we can squeeze the items to fit both into the narrow viewport. Just throwing ideas.

Regarding the padding, it was on the design specs. We can remove it if it is not valid anymore or not needed in general.

from react.

siddharthkp avatar siddharthkp commented on April 28, 2024

Regarding the early truncation, it was an accessibility improvement that we made sure there is at least two elements in the overflow menu if we are going to display a menu - see the PR that we introduced this behaviour #2471

That's very interesting, thanks!

from react.

siddharthkp avatar siddharthkp commented on April 28, 2024

Armağan: Regarding the padding, it was on the design specs. We can remove it if it is not valid anymore or not needed in general.

Maxime: There is a missing prop to remove the extra padding on the left of this component as it would provide better alignment with the content below when not used in the navigation.

I think it's always a risk when we bake in some padding around the edges of the component. I don't think we should add a prop to remove noPadding. the sx prop (or a className) should be used instead.

I'd leave it up to you and Maxime to decide if we should remove it from the default. (If we decide to remove it, we should add it back to the instances where it's already used)

from react.

broccolinisoup avatar broccolinisoup commented on April 28, 2024

I think it's always a risk when we bake in some padding around the edges of the component. I don't think we should add a prop to remove noPadding. the sx prop (or a className) should be used instead.

I'd leave it up to you and Maxime to decide if we should remove it from the default. (If we decide to remove it, we should add it back to the instances where it's already used)

Sounds like a good plan - @maximedegreve let me know how you want to go forward with that πŸ™Œ

from react.

maximedegreve avatar maximedegreve commented on April 28, 2024

My understanding is that for the UnderlineNav, most of the time you wouldn't want padding when it's added in the content area. The only exception I'm aware of right now is the UnderlineNav in the navigation, but that's something that's rarely changed.

I'm not up to speed with previous React decisions, but I thought that the sx prop is discouraged where possible.

I think this conversation goes hand in hand with the work @mperrotti is doing on our tabs. For example, in security, we use a different style of tabs that doesn't have this padding.

from react.

broccolinisoup avatar broccolinisoup commented on April 28, 2024

I did a quick lookup on the current use cases of UnderlineNav to see how many of the cases reset the padding and there are only few of them. https://musical-adventure-wlr3n3k.pages.github.io/?name=%22UnderlineNav%22&attribute=sx That doesn't mean that they should retain their padding but I just thought it might be a good place to reference before making that final decision. @maximedegreve

from react.

broccolinisoup avatar broccolinisoup commented on April 28, 2024

I am taking this to work in progress and remove from the inbox since we are having the conversation πŸ™Œ

from react.

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.