With this patch, users of panel-list can have the list gain a minimum width from
the anchor element by setting min-width-from-anchor="" on the panel-list element.
Differential Revision: https://phabricator.services.mozilla.com/D173058
Along with bringing us closer to the layout and spacing from Figma, this does the following:
1. Changes the header element to an <h1> and uses CSS to get the expected font size. This should
make the organization of the wizard make more sense to screenreaders.
2. Handles the "single resource" case for Variant 2, where we hide "Select All" and align the
resource list to the left if there's only a single resource to import.
3. Fixes a string to match the spec.
Differential Revision: https://phabricator.services.mozilla.com/D173054
This will make it easier to use Storybook to simulate how the MigrationWizard is likely to
be used in practice - which is to say, declaratively.
Differential Revision: https://phabricator.services.mozilla.com/D170666
This patch does a few things:
* creates a storybook addon for pseudo localization, which adds a button to the storybook toolbar and kicks off generating/connecting a new Fluent bundle when the pseudo localization strategy changes
* pulls in l10n-pseudo.js from the devtools profiler
* moves the fluent logic out of preview.js into a separate file (possibly a precursor to some moves we'll make when we create a proper fluent addon)
Differential Revision: https://phabricator.services.mozilla.com/D169382
It occurred to me that we're not actually using `toggle-button.css` anywhere since the about:preferences work landed. I definitely should have removed the reference in `preferences.xhtml` as part of that patch, whoops.
Differential Revision: https://phabricator.services.mozilla.com/D169530
This patch both fixes the dependency issues that we were running into when writing `.stories.mdx` stories and gives us the ability to write `.stories.md` docs only vanilla markdown stories.
To get the MDX stories working I had to clear out my `package-lock.json` and install `@mdx-js/react` with the `--legacy-peer-deps` flag as described here: https://github.com/storybookjs/storybook/issues/18094#issuecomment-1112883092
Let me know if you run into issues with installing dependencies and running Storybook given all the changes. There was a different solution I explored in January to enable MDX2 support, but I couldn't seem to resolve all the dependency version mismatch issues there anymore. There will probably be follow up work to update all of this after Storybook v7 is officially released in March.
To enable us to write `.stories.md` docs only stories I added a custom Webpack loader that takes markdown and transforms it into docs only MDX, then runs that through all the other necessary loaders. There's definitely some follow up work here too - for example right now all our docs only pages get put in a "Docs" folder because I ran out of steam for exploring a way for us to specify/parse out a path and name for the docs stories.
Differential Revision: https://phabricator.services.mozilla.com/D168268
This causes the MigrationWizardChild to request the full collection of available
migrators and user profiles, and then based on which resourceTypes those migrators
and user profiles have available, changes the visibility of the checkboxes in the
selection page of the new MigrationWizard component.
Differential Revision: https://phabricator.services.mozilla.com/D167617
This causes the MigrationWizardChild to request the full collection of available
migrators and user profiles, and then based on which resourceTypes those migrators
and user profiles have available, changes the visibility of the checkboxes in the
selection page of the new MigrationWizard component.
Differential Revision: https://phabricator.services.mozilla.com/D167617
This is still far from perfect given the limitations of the Storybook web components package, but I figured this was worth putting up since it's still an improvement over the current state of our args tables (I think).
I'm mostly leaving the default generated `custom-elements-manifest.json` alone save for filtering some internal properties we don't want documented since they shouldn't really be accessed directly. If it seems too strange to just have the `aria-label` attr documented we could possibly remove `attributes` from the docs for now (this happens because it's the only attr where the name is different from the property name).
Open to feedback/thoughts on if this is useful or too wonky for now given the weirdness around how Storybook creates naming collisions.
Differential Revision: https://phabricator.services.mozilla.com/D162599
According to mstriemer, when we want to use Lit in mozilla-central,
including in Storybook stories, this is how we want to import it now
that the Lit package has been removed from Storybook as of bug 1803151.
Differential Revision: https://phabricator.services.mozilla.com/D167611
These addons either no longer work with our custom element wrapper, or never really worked:
* backgrounds - isn't super useful because it doesn't follow theme and now doesn't have any visible effect
* mesaure - this one breaks when you click on it, it seems to be looking for a specific root element
* outline - this stil works on the docs page but isn't really useful on the main story page anymore
Differential Revision: https://phabricator.services.mozilla.com/D167295
This fixes the style leakage/conflict issue @tgiles identified by using @mstriemer's `WithCommonStyles` component as a Storybook decorator.
Differential Revision: https://phabricator.services.mozilla.com/D166380
Similar to `named-deck` listeners and `activeElement` checks needed to be updated to use `getRootNode` for cases where `panel-list` is used in the shadow DOM. `parentElement` also doesn't account for shadow roots, but swapping out `shadowRoot.host` seems to work the same. I also pulled in the changes from https://phabricator.services.mozilla.com/D166376.
Differential Revision: https://phabricator.services.mozilla.com/D166701
Took a stab at revamping and adding to the Storybook README. The stuff on reusable components should probably be in a separate document, but I wasn't sure where to put it just yet. Eventually some part of this doc will become our Storybook landing page.
Differential Revision: https://phabricator.services.mozilla.com/D166209