Skip to content
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

Web components package #928

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open

Web components package #928

wants to merge 28 commits into from

Conversation

tuomashatakka
Copy link
Contributor

@tuomashatakka tuomashatakka commented Jan 2, 2023

Description

  • Add first HDS Web Components component Accordion

Related Issue

Motivation

  • HDS will receive a wider user audience with Web Components. Web Components are easier to use in WP and Drupal environments than React Components

How Has This Been Tested?

  • on the local machine

Unfinished tasks:

  • Component tests and running environment (recommended running environment is Web Test runner)
  • Documentation Playground (there is a initial branch for this, maybe these two could be merge)
  • Documentation
  • Readme review
  • bug fixes, see notes
  • update customized example to bus colour and white text, to be less annoying and more consistent with other HDS examples (accessibility remarks)
  • add example of multiple accordions so that behaviour can be evaluated when moving from one accordion to another
  • verify close-button focus behaves as in react

Demo

@minevala
Copy link
Contributor

minevala commented Jan 5, 2023

yarn start fails on my machine:

ModuleNotFoundError: Module not found: Error: Package path ./directives/style-map is not exported from package /Users/mikanevalainen/Documents/code/helsinki-design-system/node_modules/lit-html (see exports field in /Users/mikanevalainen/Documents/code/helsinki-design-system/node_modules/lit-html/package.json)

I tried to remove node_modules and reinstall modules but it did not help. Maybe I have some version mismatch or something 🤔

@minevala
Copy link
Contributor

yarn start fails on my machine:

ModuleNotFoundError: Module not found: Error: Package path ./directives/style-map is not exported from package /Users/mikanevalainen/Documents/code/helsinki-design-system/node_modules/lit-html (see exports field in /Users/mikanevalainen/Documents/code/helsinki-design-system/node_modules/lit-html/package.json)

I tried to remove node_modules and reinstall modules but it did not help. Maybe I have some version mismatch or something 🤔

I added a .js-postfix in a lit-module import in the storybook file to fix this. Somehow the lit-modules require the full path in imports 🤷

Copy link
Contributor

@harriplappalainen harriplappalainen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's getting there! 💪

packages/web-components/README.md Outdated Show resolved Hide resolved
packages/web-components/README.md Show resolved Hide resolved
@minevala minevala requested a review from a team February 3, 2023 08:54
@minevala minevala marked this pull request as ready for review February 3, 2023 08:54
@minevala minevala added the waiting-for-accessibility-audit Issue or request is waiting for an accessibility audit. label Feb 6, 2023
"release": "lerna publish from-package --yes",
"update-versions": "lerna version --exact --no-git-tag-version --no-push --amend --yes"
"start:web-component": "lerna run --scope hds-web-components start"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that there are two similar commands with almost identical names start:web-components and start:web-component. Should start:web-component to be removed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-accessibility-audit Issue or request is waiting for an accessibility audit.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants