- We no longer trigger an exception in the blocking elements polyfill in some scenarios. This happened when a dialog was opened and then quickly disconnected before the opening animation finished, because we were trying to add a disconnected element to the blocking elements stack. We now close the foundation (or don't open in the first place if we're _really_ early) on disconnect, which cancels the opening timer. This is a scenario that can easily crop up in tests, since tests don't necessarily wait for the opening event before tearing down the test fixture DOM.
- If a dialog is opened, disconnected, and re-connected, we now re-show the opening animation, and correctly put the dialog back onto the blocking elements stack.
PiperOrigin-RevId: 281077807
In Google, every directory containing TypeScript files must be a
directory with a BUILD file (a package), and packages cannot contain
dashes. We could handle this case with a transformation, but it seems
simpler to just keep a flatter layout upstream.
fixes#444 by providing the mwc-textfied.layout() method.
In this PR:
added layout function
notch performs layout when label is changed
fixed hidden bug where foundation was being recreated too often
caused bug where changing maxLength caused foundation to unset invalid
had to pull logic out of foundation and into registerValidationAttributeHandler
The issue: when the label is floating and the element is outlined, but the label has no width, e.g.
mwc-textfield[outlined][label="something"][value="something"][hidden]
the mdc dataflow will calculate the size of the notch as zero. When hidden is removed, the notch will not update in size. Here we give them the layout method.
It is not possible to know when the textfield is changed from display: none to visible without setting a resize observer on the label. I wanted to avoid that because of possible render trashing and the overall heaviness of resizeObserver and a polyfill. Instead, it is up to the user to call layout when they change the visibility of the element.
* initial scaffolding for dialog
* add focus and blur functions to mwc-button
* flesh out dialog implementation
* do not display action footer if no actions slotted
* only layout on listeners if open
* run formatter
* scrollable actually is handled by adapter / found
* fix reversing of actions
* - slotchange + `hideActions`, buttons->actions
* fix slotted styles
* remove style tag mutation
* change style dependencies
* don't leak mdc in dialog actions and initial-focus atributes
* make action and focus attributes configurable
* add css custom properties to dialog
* forgot to change checkbox to dialog
* dialog was made in 2019
* button -> action and remove isVisible
* removed leaky events from dialog lifecycle
* clean up tsconfig
* add unit tests
* textfield -> dialog
* run formatter
* fix multiple dialogs
* fix scrolling
* try to make max-width better
* initial pass at making older tests pass
* escape key on document instead
* run formatter
* fix lint issues
* try more arcane keyboardevent for older browsers
* fix styling associated with multiple in sec action
* fix focus on textfield
* also fix blur on textfield
* mwc-dialog demo
* add dialog to the main demo page
* fix typo in demo
* fix style edge case max-width too small cause jump
* redo change to max-width jumping
* first half of readme
* include video tag in static urlify script
* finish readme
* regenerate package-lock
* fix readme typo
* change confirmation gif size
* cleanup extraneous readme code
* do not override mdcfoundation.open
* make stacked a css change rather than DOM
* make stacked a css change rather than DOM impl
* add color swatches to readme
* fix all test file copyright dates
* add in the styles for the list in the readme
* use formfield in confirmation example
* scrollable degification
* make styled example the same as spec page
* dedupe initial focused example readme
* small dialog readme fixes
* update initial focus readme example
* moved alert example to top and commented out Simple example
* update standard gif to be static
* move event listeners to open an close
* readme change suggestions
* HTMLSlotElement removed from public props
* make public props lit element props
* primary-action => primaryAction; d-i-f => dIF;
* implement suggestions
* run formatter
* resolve merge issues
Previously, mwc-base re-exported lit-element and lit-html. While that
approach does make it a little easier to manage dependencies, it's
better to include the dependency directly. Lerna can easily be used
install/upgrade a dependency across all or a subset of packages.
- Users are likely to copy this style. We would prefer that if they use
lit, they directly depend on it, instead of depending on our base class
even when they may not need it.
- It locks us into using lit in our implementation without a breaking
change. No plans to change that, but it's just one less thing in our
API surface.
- It works better for internal Google tooling because the lit dependency
can be analyzed statically.
* add focus and blur functions to mwc-button
* fix focus on textfield
* also fix blur on textfield
* run formatter
* update changelog
* lintfix
* update changelog to match older style
* make ripple a dep vs dev dep
* focus and blur buttons with or without ripple