Code Monkey home page Code Monkey logo

spectrum-web-components's Introduction

Who are we?

Spectrum Web Components is a future-looking project to develop Adobe Spectrum design language based around web components, ES-Modules, and modern browser standards.

To this end, Spectrum Web Components only targets modern, evergreen browsers that fully implement the Custom Elements V1 specification, e.g. Chrome, Firefox, Safari. Polyfills will be avoided as much as possible but documented if necessary.

Requirements

  • NodeJS >= 18.17.0
  • Typescript
  • Browsers with Custom Elements V1 and Shadow DOM support, e.g. Chrome, Firefox, Safari, Edge (79+)
    • Or appropriate polyfills in older browsers.

Getting started

git clone https://github.com/adobe/spectrum-web-components.git
cd spectrum-web-components
yarn

The call to yarn will install and setup everything you need for developing and running the packages in this library.

Typical development will involve running yarn storybook, yarn test, and yarn docs:start if you're making documentation changes (see below for additional details).

Building a new component

Creating a new component from the command line can be done by running the following:

$ yarn new-package

This will scaffold your component's required architecture by prompting you for 2 data points - the desired name for your package and the name of the Spectrum CSS asset from which you will be building.

? SWC package name (i.e. color-area)

Note that your component name should be provided in kebab case and should relate as closely as possible to the Spectrum core naming.

? Spectrum CSS package name (i.e. colorarea)

You can find this information in the Spectrum CSS GitHub project by finding the component package.json (i.e., components/accordion/package.json)

For additional information, please see the generating components documentation and capturing the value of the package name: "name": "@spectrum-css/accordion". In this example, that name is accordion. Note that the project scope @spectrum-css is stripped out of the response.

Storybook

Testing & reviewing changes can be done using the Storybook instance. Running yarn storybook will spin up a local instance of Storybook, triggering the browser to open at completion. From there you can make changes to your code and the browser will automatically refresh.

You can run Storybook through the command:

yarn storybook

By default, the resulting site will be available at http://localhost:8000.

Documentation

The Spectrum Web Components documentation site is available via the following command:

yarn docs:start

By default, the resulting site will be available at http://localhost:8080.

In the case that you'd like to serve and test a static build of the documentation from the root directory (localhost or otherwise), use:

yarn docs:build

Updating Spectrum CSS

There are two mechanisms for broadly updating SWC's Spectrum CSS dependencies:

  • yarn update:spectrum-css brings all Spectrum CSS dependencies to 'latest'
  • yarn update:spectrum-css:nonbreaking brings them to the latest minor or patch version

We aim to keep Spectrum CSS as current as possible, to track the Spectrum design system closely. The :nonbreaking variant lets us release patch updates quickly in cases where more work is required to be compatible with 'latest.'

Advanced development

There are several commands that can be useful in specific scenarios:

  • yarn build:clear-cache to remove previously created artifacts of the tsc build process.
  • yarn spectrum-vars to ensure that theme files are up-to-date.
  • yarn process-icons to make sure that the most recent icons are included.
  • yarn process-spectrum to process the spectrum CSS style sources into the individual packages.
  • yarn build to make sure the available JS has been built from the current TS source.

Linting

The project will be linted on a pre-commit hook, but you can also run the lint suite with yarn lint. It uses ESLint to lint the JS / TS files, and StyleLint to lint the CSS files.

Dependency linting

There are downstream issues that can arise from multiple packages in this mono-repo using dependencies with mismatching version strings. This is particularly an issue for dependencies below 1.0.0 but can be exacerbated in that context and others by more strict settings that can be applied in various package managers. By default, Lerna will bump version numbers of internal dependencies when the various packages are published and the depended version is pointing to the latest release, which can help to mitigate this issue. This can be further mitigated by using ^0.0.0 structured dependency versions, the ^ allowing for the highest amount of upward flexibility in satisfying the dependency. When using these version strings, yarn lint:versions which ensure that all instances of those strings for the same dependency match across the repo.

yarn list:versions --fix will reach into the package.json files and update all dependencies to the latest version available in the library, a possibly dangerous operation. If you know this is what you want to do when there are mismatched versions found by yarn lint:versions, this can make greatly shorten the amount of work to catch the versions up to each other.

Testing

Unit tests

Unit tests are run with Web Test Runner in Playwright using the Chai, Mocha and Sinon helper libraries. These tests can be executed with:

yarn test

During development you may wish to use yarn test:watch to automatically build and re-run the test suites.

Screenshot testing

Note: visual regression is done automatically on pull requests via CircleCI; however, the following outlines how you can run these tests local to your machine.

Visual regressions are tracked via screenshot testing powered by @web/test-runner-visual-regression. Due to the font metrics not being identical, it is difficult to rely on screenshot-based testing across operating systems. Because of this, the library manages its golden image cache internal to CircleCI, rather than as a part of the git repository. Neither the screenshots-baseline nor screenshots-actual directory should be added to git. When working with visual regression tests locally to manage changes you are making, be sure to create a baseline locally before you begin development (alternatively, you can pull down the main branch to generate the baselines for your in-progress work).

To create a local baseline for comparing your changes to later in the development cycle, use the following:

yarn test:visual:clean # start with a clean slate
# yarn test:visual:clean:baseline # removes only baseline images
# yarn test:visual:clean:current # removes only images updated in the most recent test pass

# To enable comparison, it is generally recommended to generate baselines on the main branch.
yarn test:visual vrt-${component name} --update-visual-baseline
eg: yarn test:visual vrt-accordion --update-visual-baseline

# Running the tests on the local branch
yarn test:visual vrt-${component name}
eg: yarn test:visual vrt-accordion

# Running the tests of light medium ltr
yarn test:visual vrt-${component name}-single
eg: yarn test:visual vrt-accordion-single

Screenshot coverage

Visual regression testing is done against screens derived from the exports of the *.stories.js files in each package. As you add packages or story files to existing packages, they will automatically be added to the visual regression suite and will require updating the cache key (outlined below).

Keeping CI assets updated

If you find the visual-* jobs failing on CircleCI for reasons that you expect (you've updated the Spectrum CSS dependencies, you've added new tests, etc.) then you will need to update the golden images cache key before your build will pass. You can review and share the diffs for a test pass via a URL shaped like vrt--spectrum-web-components.netlify.app/${branchName}. Before updating the cache key, be sure that the updated caches are both complete (there are times when process errors prevent images from being correctly created or when certain test passes take longer than others) and appear as expected. If you agree with the updated cache content, update the golden images cache key as follows.

Your failing branch will have created a new cache with a key of v1-golden-images-{{ .Revision }}-<< parameters.regression_color >>-<< parameters.regression_scale >>-<< parameters.dir >>-{{ epoch }}. Here {{ .Revision }} outlines the git commit hash of the current CI pass. In .circleci/config.yml, you will use that to update the cache that is requested at the beginning of the run-regressions job. As part of the review site, the git commit hash will be listed in the side navigation UI for easy access, use this number to update the current_golden_images_hash paramater that appears as follows:

parameters:
    current_golden_images_hash:
        type: string
        default: ${UPDATE_REVISION_NUMBER_HERE}

This will ensure that tests on this branch point to this cache key for at least the next 30 days (keep-alive time of caches on CircleCI). Once the branch is merged to main, a cache key of v2-golden-images-main-<< parameters.regression_color >>-<< parameters.regression_scale >>-<< parameters.regression_dir >>-{{ epoch }} will be created on each successful build of main that will be long-lived and act as the "fallback" once the revision keyed cache has expired.

Benchmarking

You can acquire current runtimes for the individual elements with:

yarn build:tests
yarn test:bench

This will run the defined Tachometer tests and report the current runtime cost of each individual element. When not making changes to the benchmarks on your local machine, you can skip yarn build:tests for later passes.

Anatomy of a component

There is extended documentation on adding a new component to the library in the documentation site. However, at a high level, you will be building the following structure:

  • packages
    • new-component-name
      • src
        • index.ts
        • new-component-name.css
        • new-component-name.ts
        • spectrum-config.js
        • spectrum-new-component-name.css
      • stories
        • new-component-name.stories.ts
      • test
        • benchmark
          • test-basic.ts
        • new-component-name.test.ts
      • package.json
      • README.md
      • tsconfig.json

For a list of component waiting to be implemented, visit our missing components tag.

IDE Notes

The build process compiles .css files using PostCSS and wraps them in the lit-html css template tag and writes out a .css.ts file for easy import into TypeScript files. This file should not be edited, and is ignored by .gitignore, but you may also wish to hide the files in your IDE.

Contributing

We'd be very grateful if you contributed to the project! Check out our contribution guidelines for more information.

Active patches

lru-cache

The lru-cache leveraged by @web/dev-server can interact negatively with ARM based macOS machines causing a critical hang in the cache of transpiled file responses. This only effects development time operations and specifically effects the local test passes. To avoid this [email protected] has been patched to make its set method a noop, avoiding the caching process all together.

spectrum-web-components's People

Contributors

adixon-adobe avatar andrewhatran avatar beeduul avatar bengfarrell avatar benjamind avatar blunteshwar avatar castastrophe avatar cuberoot avatar dependabot[bot] avatar greenkeeper[bot] avatar hunterloftis avatar jawinn avatar jenndiaz avatar jianliao avatar lunarfusion avatar majornista avatar mlogsdon18 avatar monkeyjabs avatar msdewey avatar najikahalsema avatar nickschaap avatar pfulton avatar rajdeepc avatar renovate[bot] avatar simshanith avatar sorinsarca avatar spdev3000 avatar tarunadobe avatar trieloff avatar westbrook avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spectrum-web-components's Issues

Components should emit plain "change" events

Expected Behaviour

I should be able to register to receive a change event from any of our input components. That would be any component that takes a value attribute. Some libraries use change events to implement two-way binding.

Actual Behaviour

Each component defines it's own custom change event (e.g. sp-slider:change).

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Write code using a framework that implements two-way binding and see that the binding don't update when you change the value using the component.

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Update scripts to use exported css variables from spectrum-css

Currently we use the split-spectrum script to extract css variables from spectrum on a per-component basis.

This is no longer necessary since spectrum-css now exports css variable artifacts, we should update this repository to use them directly for a smaller bundle and easier development process.

<sp-theme> applies position:relative

Expected Behaviour

shouldn't override to position:relative -- it's surprising, and could break layout logic when added.

Actual Behaviour

It does set position:relative

API documentation extraction doesn't support some JSDoc tags

Expected Behaviour

All tags listed here should be extracted.

Actual Behaviour

Many of the tags (e.g. @fires) don't seem to be extracted

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Add an @fires tag to the docs for a component and see if it shows up in the API docs for the component.

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Sliders do not behave on Safari

Expected Behaviour

Sliders should respond to mouse events and should not show a highlight box

Actual Behaviour

The sliders are not moving when I drag on them and I am seeing an active frame around the control.

SafariSlider

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Look at the Storybook in Safari

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Overlays do not work correctly in Edge

Expected Behaviour

The overlay-trigger and overlay-root elements should allow you to open overlays in all mainstream browsers.

Actual Behaviour

The overlay items are not hidden when they are not open, and they do not move to the correct positions when opened.

Screen Shot 2019-08-07 at 3 28 32 PM

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Investigate using `lit-analyzer` in CI

Expected Behaviour

All code should be issue free and machine parsable errors shouldn't be left for human eyes to detect. We should be able to leverage lit-analyzer on commit or in CI to ensure that's true.

Actual Behaviour

While some people use lit-plugin in VS Code, we can't really "require" that they do.

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.

Loading CSS custom properties into :root doesn't work for Edge

Expected Behaviour

If we load the theme css into :root, it should be picked up by the web components

Actual Behaviour

On Edge, when I build with Webpack, for some reason Edge doesn't pick it up the variable that are injected into the <head> element.

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Run the documentation server and look at it in Edge.

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Storybook should be able to build source itself

Expected Behaviour

We should be able to do npm run storybook and it should start up without requiring npm run watch. All code should rebuild automatically when changes are made.

Actual Behaviour

We need to run npm watch and sometimes you have to restart that process and npm run storybook to see updates.

Reproduce Scenario (including but not limited to)

Making changes to component CSS while running storybook.

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

There is no way to know what tab is selected in change event

Expected Behaviour

When a change event is received from an sp-tab-list element, I should be able to check what tab is now selected.

Actual Behaviour

The the selected property on the sp-tab-list has not been updated, so there is no way to know which tab was selected.

Reproduce Scenario (including but not limited to)

I can reproduce this using the documentation

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Add target support for <sp-button href=""> variant

Expected Behavior

You should have the option to specify target="_blank" when using the href variant of sp-button (or we should create a new <sp-anchor-button> variant to support this pattern).

Actual Behavior

target attribute is not supported.

Npm packages have vulnerabilities

Expected Behaviour

npm install should have zero vulnerabilities

Actual Behaviour

npm install shows 1296 vulnerabilities (mostly repeats of lodash)

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Run npm install in the project directory.

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Improve sp-slider-color interface

The proposed sp-slider-color implementation in #10 is initially not going to implement a proper interface for color sliders.

We should implement a more natural interface, allowing min and max color values, selection of which channels are mutated by the slider, and possibly better control over the gradient used.

Focus styles for quiet and over-bg links are being overridden

Expected Behaviour

Quiet and over-bg links should have a double underline when focused. The double underline declaration is contained within the a:focus rule.

Actual Behaviour

Quiet and over-bg links show a single underline when focused.

The declarations in a:focus are being overriden by the ones in :host([quiet]) a and :host([over-background]) a, which have higher specificity.

:host([quiet]) a and :host([over-background]) a contain a declaration for text-decoration: underline, which overrides the double underline.

Reproduce Scenario (including but not limited to)

Whenever quiet/over-bg link is focuses

Steps to Reproduce

Tab focus the quiet and over-bg link

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Rework imported css variables from spectrum-css

Expected Behaviour

Since our CSS is 'modern' and has all the css variables from spectrum intact and not processed out we should be able to include a minimum set of variables for medium/large/light/dark themes.

Actual Behaviour

Currently we include all the CSS produced by spectrum in our themes and this results in a huge amount of wasted bytes.

Reproduce Scenario (including but not limited to)

Load up the documentation site and inspect the imported css.

Clicking a button element applies tab-focus styling

Expected Behaviour

Clicking a button shouldn't change it to the focused (always blue-background) styling.

Actual Behaviour

Clicking it does apply a blue background focus until you tab or click away.

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Click a <sp-button primary> element.

Platform and Version

Mac 10.14.6, Chrome 75.0.3770.142

There are a couple of styling issues with buttons

Expected Behaviour

There are two issues that I have noticed with button rendering:

  1. There is a vertical alignment issue between buttons that have an icon and those that don't. Setting the CSS vertical-align: top on the sp-buttons fixes it, but I'm not sure that is the right fix.
  2. If there is only an icon, there is too much space to the right of the icon in the button.

Actual Behaviour

Screen Shot 2019-06-18 at 3 53 51 PM

Reproduce Scenario (including but not limited to)

Look at the documentation page for sp-button

Steps to Reproduce

Look at the documentation page for sp-button

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Documentation build output isn't quite right

Expected Behaviour

Build should only create the necessary build products and the build product file names should contain hashes.

Actual Behaviour

The builds are creating directories such as documentation/dist/Users/mitaylor/Documents/Adobe/ponysaurus/spectrum-web-components/ that are exposing the details or my build machine.

Also, the filenames do not contain hashes

Reproduce Scenario (including but not limited to)

Steps to Reproduce

npm run docs:build

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

The constructor for Iconset violates custom element requirements

Expected Behaviour

We should be able to create an iconset derivative without errors

Actual Behaviour

Latest Chrome canary is flagging a problem and won't create an iconset because it adds an attribute to itself in the constructor. That violates the spec

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Demo for overlay-root is broken

Expected Behaviour

The demo page for overlay roots should show working overlay roots

Actual Behaviour

There is an error in the console related to the reworking of buttons.

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Run npm serve:watch and navigate to http://localhost:4000/overlay-root/demo/

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Css variables should be displayed in the documentation of all components

Expected Behavior

The documentation of our components should also display the css-variables used in that component's styling. This is so users of the components can easily restyle the component.

web-component-analyzer comes with css-variable extraction built in.

Actual Behavior

css-variables are currently not presented in the documentation

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Add :focus-visible polyfill handling

Expected Behaviour

:focus-visible is used in spectrum-css to define focus states for mouse/touch vs keyboard interactions. Strong focus styles are applied on keyboard nav, while weak ones (or no focus at all) are applied for mouse/touch interactions.

Suggested fix is to apply the https://github.com/WICG/focus-visible polyfill to our components where necessary.

Actual Behaviour

Focus is incorrectly handled in tabs and buttons and a number of other components.

Reproduce Scenario (including but not limited to)

Focus a tab with mouse interaction and see the strong focus styling, this styling should only be applied when using keyboard navigation to drive focus to the tab.

spectrum-css extraction should use selector AST parser

Expected Behaviour

The script that processes the spectrum-css should be extendable and maintainable.

Actual Behaviour

The regular expressions used in the script are hard to understand and extend. There are subtle edge cases that are hard to handle in a semantically correct way.

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Review testing config for better coverage reporting

Expected Behaviour

Test coverage can be easily acquired.

Actual Behaviour

Not sure how.

Reproduce Scenario (including but not limited to)

npm test gives pass fails, but no inline or output based coverage information.

Current Idea

I'm not sure whether/how the junit reporting is actually being used in our CI processes. Investigate replacing it with @open-wc/karma-testing or extending from the open-wc config with the junit work. This should also reduce our direct dependency graph, which will make maintaining the repo easier long term.

Overlays do not support nesting

Expected Behaviour

Overlays (overlay-root and overlay-trigger) should support arbitrary nesting.

Actual Behaviour

The current overlay-root component can only display a single overlay at a time.

Reproduce Scenario (including but not limited to)

Try to have a button in a popover open a second popover

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

See the overlay-root.stories.ts file in this PR

Logs taken while reproducing problem

We need some documentation for users

Expected Behaviour

We should have some documentation and examples for people who wish to use our components.

Actual Behaviour

Users have to look at our test cases in our storybooks

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Techometer reporting

Expected Behaviour

Tachometer scoring is applied somewhere and covers a decent amount of an elements standard use cases?

Actual Behaviour

You have to run it manually.

Reproduce Scenario (including but not limited to)

npm run test:bench

Notes:

Be sure to check on things like #103 (comment) when deciding how to cover use cases.

The tabs are missing from the documentation

Expected Behaviour

There should be "Examples" and "API" tabs at the top of each component documentation page.

Actual Behaviour

The tabs are missing

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Build the documentation and browse to any component's documentation

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Component documentation should include API (props, attrs, etc)

Expected Behaviour

Our documentation should include information about the API of a component (e.g. attrs and properties).

Actual Behaviour

Right now, our documentation only contains examples.

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Auto-Publish GitHub Pages?

How is the docs generation supposed to work? We can run npm run docs on every commit to master and then push the resulting documentation folder into the gh-pages branch. Are there additional steps that would need automation?

Make repo public

What is missing to make this public?

There has been some requests on the Adobe Devs slack about it.

We should have checkboxes and switches

Expected Behaviour

We should have sp-checkbox and sp-switch components as they are standard Spectrum controls.

Actual Behaviour

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Spectrum Textfield

Add support for the Spectrum Textfield pattern, which is closely related to the Spectrum Textarea pattern.

Open questions:

Multiple <sp-checkbox> elements jump on Safari when checked.

Expected Behaviour

If you have multiple elements, their alignment/position doesn't change.

Actual Behaviour

One of the checkboxes will move vertically on Safari when checked.

Reproduce Scenario (including but not limited to)

Steps to Reproduce

  1. Modify the checkbox story to add a second checkbox.
  2. Check the checkboxes in Safari

Screenshots

before-cb

after-cb

with-focus

Platform and Version

Safari 12.1.2

Sample Code that illustrates the problem

<div>
    <sp-checkbox>Checkbox</sp-checkbox>
    <sp-checkbox>Checkbox 2</sp-checkbox>
</div>

Logs taken while reproducing problem

Stories are not compiled with Typescript

Expected Behaviour

The stories for Storybook should be compiled with Typescript

Actual Behaviour

They are being left as JavaScript by Webpack

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Break into a mono-repo with individual versioning

Expected Behaviour

I should be able to acquire updates to one element without having to update others.

Actual Behaviour

The package has all of the elements versioned together.

Reproduce Scenario (including but not limited to)

npm install @spectrum-web-components // theoretical

Path forward

  • Move to a full mono-repo, likely Lerna unless there are major objections/major experience with other tools.
  • Reorganize repo so that all things element based are in that elements package: code, tests, docs, dependancies, etc.
  • Publish elements as individual repos.
  • Update docs processing to point to packages as dependancies.

Questions

  • can artifactory manage packages that are private for now but will become public later or can we rely on Lerna based github publishing in the interim?
  • does the documentation site need to be updated to document the elements overtime (i.e. do we need to document multiple versions of components or only the most recent version?)
  • should we alter version numbering to match the release cycle of Spectrum CSS?
  • can we move the documentation site to a "package" in the mono repo for easier management?
  • do we also want to publish a "kitchen sink" package to just get everything? this can be particularly useful during the prototyping phase of a new project.

Follow up work

  • use the new format to create check list type issues in the repo for components that we don't currently surface

Update to open-wc webpack support breaks build

Expected Behaviour

The documentation should build without errors

Actual Behaviour

The documentation build was giving this error:

Error: [WebpackIndexHTMLPlugin]: Could not find entry file: ./index.html

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Build the docs with a newer version of @open-wc/building-webpack

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Request: Support `:host::before` in `npm run process-spectrum`

Expected Behaviour

I've like to be able support :host::before and :host([attribute])::before in the CSS processing as it should allow for less DOM elements and more "correct" out, particularly in contexts like #111 where we'd be able to allow more flexible styling from the outside rather than having to bake certain non-cannon style applications into the component.

It seems that we have the ability to: https://stackblitz.com/edit/host-selector-before?file=my-element.js I also have one version of Firefox ESR that is still on the old version that I tested this on to great success. @benjamind, do you have pre-Chromium Edge on your system to confirm there? @cuberoot, you're supporting IE11 with your products do you have accessible environments to test there to confirm?

Actual Behaviour

We need to push what should be :host styles into an interior DOM element, which locks access to it inside of the Shadow DOM.

Reproduce Scenario (including but not limited to)

See https://github.com/adobe/spectrum-web-components/blob/master/src/tab/spectrum-config.js:

host: {
                // A lot of the styling in tab-item relies on the ::before psuedo element,
                // which is incompatible with :host
                selector: '.spectrum-Tabs-item',
                shadowSelector: '#tab',
            },

Use semantic-release?

For Project Helix, we are using semantic release and despite the additional work you need to put in when committing (run npm run commit instead of git commit), we've found it worthwhile, as it gives us an automated release process

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.

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.