-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Global: Add transition duration and delay options #8651
Conversation
The change itself LGTM. However, before we add a ton of these defaults we need to decide some basic rules. Do we add like Or @ScarletKuro @mikes-gh @danielchalmers opinions? |
Honestly, I don't know. This properties (variants, texts etc) are more related to the theme topic than the |
Theming is theming, defaults are defaults. Mixing these two together makes everthing very complicated. |
Might be worth adding them directly to |
@henon I would think of defaults as more of a devs thing. DataGrid Column sorting is While theming could well be up to the end user to decide. Choosing a theme that has |
I slept over it. The problem I see with @ScarletKuro's suggestion of a default theme is that it implies that all the values in the theme will be dynamically changeable by switching themes at runtime. That's why I insisted on distinguishing between theming and default settings. The beauty of a default is that it is static. Set once at startup, never change. No need for re-rendering components, etc. If you want to dynamically switch button variants at runtime like @dennisrahmen suggests above, you end up with a lot more complexity in the components than I'd feel comfortable with. I really don't think it would be worth it (feel free to proof me wrong here). We'd have to switch to nullable values for every parameter and come up with theming logic etc now. And how do you re-render all the affected components? Maybe I am wrong here and it wouldn't be all that big of a deal? It would have to be tested out with a proof of concept PR. The way I see it, customizable default values seem to be something many need. It is mightly inconvenient to have to set the same parameters over and over again when using mudblazor components, I know that from experience. Although when talking about this problem the discussion always immediately turns toward theming I haven't experienced a need for theming such values myself (which variant to use is a deliberate decision of the designer not the customer's choice, like @dennisrahmen correctly said) and I haven't seen issues requiring the need for dynamically switching button variants and other default values, it seems purely hypothetical like @danielchalmers said. Again, maybe I am ignorant here, so feel free proof me wrong. If we distinguish between defaults and themable values we make it clear what can be changed dynamically and what can't. So having the defaults in Conclusion: Adding customizable defaults is dead simple and we don't have to come up with theming logic and design now. It doesn't prevent theming later as themes would override defaults. I am of course always open to your ideas, I don't want that we go in the wrong direction just because I said so =P |
Ok, let's go with defaults that apply equally for all components for now. Defaults for single components inheriting from global defaults such as |
I understand what @henon is trying to say, but "defaults are default" is more complicated than just that. |
@ScarletKuro This is a quote from my essay above, just to be clear, I never said having customizable default appearance doesn't allow us to make those things themable later. |
Sure, defaults for the appearance could live in another static class if we really need that distinction, which I am not sure. They are still static default values even if they are default values for the appearance. Theming can override them of course. |
@henon @ScarletKuro Any others I should add in this PR so we can see what it looks like? I would say keep it relatively simple for now and save Variant etc for later |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #8651 +/- ##
==========================================
+ Coverage 89.82% 90.09% +0.26%
==========================================
Files 412 418 +6
Lines 11878 12017 +139
Branches 2364 2366 +2
==========================================
+ Hits 10670 10827 +157
+ Misses 681 658 -23
- Partials 527 532 +5 ☔ View full report in Codecov by Sentry. |
@danielchalmers this PR is definitely OK so far. The discussion whether or not we manage defaults for appearance somewhere else can be continued in the team channel. |
Description
Resolves #8639 by adding global transition properties that effect the tooltip, popover, and picker.
Part of #4896.
Cleanup:
MenuItemDebounceInterval
Needs vetting to make sure this is the way to go for this and that I did it the correct way.
How Has This Been Tested?
visually
Types of changes
Checklist
dev
).