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

feat: ESDS 3.0 release based on Vue 3 and PrimeVue #1461

Open
wants to merge 888 commits into
base: main
Choose a base branch
from

Conversation

ericdouglaspratt
Copy link
Collaborator

@ericdouglaspratt ericdouglaspratt commented Jul 24, 2024

๐Ÿ”— Linked issue

โ“ Type of change

  • ๐Ÿ“– Documentation (updates to the documentation or readme)
  • ๐Ÿž Bug fix (a non-breaking change that fixes an issue)
  • ๐Ÿ‘Œ Enhancement (improving an existing functionality like performance)
  • โœจ New feature (a non-breaking change that adds functionality)
  • โš ๏ธ Breaking change (fix or feature that would cause existing functionality to change)

๐Ÿ“š Description

  • New es-ds-components package that is a Nuxt layer package and contains the PrimeVue config for downstream Nuxt 3 applications, as well as all related components
  • New es-ds-docs folder that contains a Nuxt 3 app to power the new design system documentation site
  • Local development and hot reloading are now much faster and simpler; the necessary linking and dev server initialization can be accomplished with a single command: make dev

๐Ÿฅผ Testing

  • Tested on the new local docs site

๐Ÿง Feedback Requested / Focus Areas

  • Overall

๐Ÿ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.
  • I have documented testing approach

@ericdouglaspratt ericdouglaspratt changed the title feat: create foundation for Vue 3 design system work feat: feature branch for Vue 3 design system work Jul 24, 2024
es-ds-docs/app.vue Outdated Show resolved Hide resolved
es-ds-docs/assets/scss/main.scss Outdated Show resolved Hide resolved
es-ds-docs/nuxt.config.ts Outdated Show resolved Hide resolved
es-ds-docs/package.json Outdated Show resolved Hide resolved
es-ds-docs/package.json Outdated Show resolved Hide resolved
es-ds-docs/package.json Outdated Show resolved Hide resolved
@ericdouglaspratt ericdouglaspratt changed the title feat: feature branch for Vue 3 design system work feat: ESDS 2.0 Vue 3 design system based on PrimeVue Jul 25, 2024
@ericdouglaspratt ericdouglaspratt changed the title feat: ESDS 2.0 Vue 3 design system based on PrimeVue feat: ESDS 3.0 design system based on Vue 3 and PrimeVue Jul 25, 2024
@ericdouglaspratt ericdouglaspratt changed the title feat: ESDS 3.0 design system based on Vue 3 and PrimeVue feat: ESDS 3.0 release based on Vue 3 and PrimeVue Jul 25, 2024
@ericdouglaspratt
Copy link
Collaborator Author

ericdouglaspratt commented Jul 25, 2024

@tomleo The basic "hello world" foundation should be ready for a review now. Keep in mind, as per the ticket description, that the scope of this stage is:

  1. create a feature branch
  2. create the es-ds-components folder and package as a Nuxt layer
  3. create the es-ds-docs folder, put a starter Nuxt 3 app in there, hook it up to es-bs-base and es-ds-components, and make sure hot reloading works for local development

I'm particularly interested in any feedback on the names of the makefile commands (make dev vs. make legacy-dev) and how we can best preserve the old packages' commands in case we need to do a hotfix (more worried about that in the Lerna case actually, which isn't set up yet for the new thing), while keeping it simple to run the new 3.0 design system locally and publish it.

And this PR will remain open for a while (so no need to fully approve it), as it represents the feature branch we'll work against. But worth reviewing what's there so far and any concerns. I've created or will create separate tickets for setting up the initial content in the docs site along with PrimeVue, Jest testing, linting, prettier, simultaneously publishing to NPM via Lerna, etc, as some of those can be done in parallel with developing PrimeVue components.

@mpleroux
Copy link
Member

mpleroux commented Jul 26, 2024

I get this error when running make dev after going through the usual build steps for es-ds. Is it looking for an npm package that doesn't exist yet?

mike@redtail es-ds % make dev   
npm --prefix es-bs-base link

up to date, audited 3 packages in 445ms

found 0 vulnerabilities
npm --prefix es-ds-components link

up to date, audited 3 packages in 275ms

found 0 vulnerabilities
cd es-ds-docs; npm link @energysage/es-bs-base @energysage/es-ds-components
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@energysage%2fes-ds-components - Not found
npm ERR! 404 
npm ERR! 404  '@energysage/es-ds-components@*' is not in this registry.
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in: /Users/mike/.npm/_logs/2024-07-26T16_47_07_229Z-debug-0.log
make: *** [dev] Error 1

@hroth1994
Copy link
Contributor

I get this error when running make dev after going through the usual build steps for es-ds. Is it looking for an npm package that doesn't exist yet?

mike@redtail es-ds % make dev   
npm --prefix es-bs-base link

up to date, audited 3 packages in 445ms

found 0 vulnerabilities
npm --prefix es-ds-components link

up to date, audited 3 packages in 275ms

found 0 vulnerabilities
cd es-ds-docs; npm link @energysage/es-bs-base @energysage/es-ds-components
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@energysage%2fes-ds-components - Not found
npm ERR! 404 
npm ERR! 404  '@energysage/es-ds-components@*' is not in this registry.
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in: /Users/mike/.npm/_logs/2024-07-26T16_47_07_229Z-debug-0.log
make: *** [dev] Error 1

I got this error too.

@mpleroux
Copy link
Member

After reviewing the contents of this PR more I now understand it's not meant to be run until the es-ds-components package exists. I familiarized myself with the files and I don't have any specific feedback right now.

@ericdouglaspratt
Copy link
Collaborator Author

ericdouglaspratt commented Jul 26, 2024

Yeah I'm not entirely sure why that error happens - my first assumption was that it was because I hadn't given you an install command to run - I've now updated make install to run npm install on the newer folders - maybe that's necessary first.

If running make install and then make dev still doesn't work, maybe we can debug on Monday, because it works for me (originally, admittedly after manually running npm install in each folder separately, which make install should now be able to accomplish for you). And it's true the es-ds-components package doesn't exist on NPM, but if the local linking is working correctly, it shouldn't have to yet.

It could be because es-bs-base is listed first in the npm link command, so it tries to NPM install all the other packages including es-ds-components as part of that first step, and can't find it. I wonder if changing the order in the Makefile so that es-ds-components is first would help.

@ericdouglaspratt
Copy link
Collaborator Author

@mpleroux @hroth1994 I just published @energysage/es-ds-components to NPM and properly added it to the package.json of es-ds-docs - can you try again?

@hroth1994
Copy link
Contributor

@mpleroux @hroth1994 I just published @energysage/es-ds-components to NPM and properly added it to the package.json of es-ds-docs - can you try again?

make install and make dev works now but I'm seeing a ton of these warnings:
image

@ericdouglaspratt
Copy link
Collaborator Author

Yeah I'm seeing those too; the newer version of SASS we're using is just saying some stuff is deprecated and should be cleaned up at some point. A full refactor of es-bs-base is a bit out of scope for this project, though I can make a ticket to have a look if we can clean it up because it makes it tougher to see other errors.

@mpleroux
Copy link
Member

I have the same experience. I can run it locally and see the messages from App.vue and TestComponent.vue.

@mpleroux
Copy link
Member

mpleroux commented Jul 29, 2024

After reading the Sass page about those Mixed Declarations warnings it doesn't look like an easy fix. Declarations could be reordered within a single file, but conflicts between two files may require restructuring some of Bootstrap's SCSS:

   โ”Œโ”€โ”€> ../../../.nodenv/versions/18.19.1/lib/node_modules/@energysage/es-bs-base/scss/_custom-forms.scss
501โ”‚       appearance: none;
   โ”‚       ^^^^^^^^^^^^^^^^ declaration
   โ•ต
   โ”Œโ”€โ”€> ../../../.nodenv/versions/18.19.1/lib/node_modules/@energysage/es-bs-base/scss/mixins/_transition.scss
24 โ”‚ โ”Œ       @media (prefers-reduced-motion: reduce) {
25 โ”‚ โ”‚         transition: none;
26 โ”‚ โ”‚       }
   โ”‚ โ””โ”€โ”€โ”€ nested rule

I was wondering how Bootstrap themselves were handling it and their solution seems to be... downgrading Sass from 1.7.7.8 to 1.7.7.6? ๐Ÿคฆ

Copy link
Collaborator

@nathanielwarner nathanielwarner left a comment

Choose a reason for hiding this comment

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

Nice work on this! I'm glad you were even able to get the Prism source code viewing working.

Regarding the SASS deprecation warning, I don't know why we didn't encounter this before in the POCs. But in any case, I'm not sure it's that complex.. I left a comment on the ticket.

I also wonder whether we should be maintaining the old repos (es-vue-base and es-design-system) within this repo. es-vue-base would be broken if we remove styles from es-bs-base that are specific to the BootstrapVue implementation. It seems like we could keep the old design system as a branch instead.

es-ds-docs/pages/index.vue Outdated Show resolved Hide resolved
es-ds-components/components/b-col.vue Outdated Show resolved Hide resolved
es-bs-base/scss/modules/blues.module.scss Outdated Show resolved Hide resolved
es-ds-docs/nuxt.config.ts Outdated Show resolved Hide resolved
Copy link

swarmia bot commented Sep 4, 2024

โœ… ย Linked to Task ESDS-3 ยท [email protected] creation

ericdouglaspratt and others added 26 commits December 4, 2024 16:13
โ€ฆnings

fix: ran sass-migrator on files with deprecation warnings
feat: enable templated EsDataTable cells; better match PrimeVue API
feat: Add peek props to carousel and update numDots calculation
fix: accordion initial expand with multiple expand
feat: add preference center link to footer
Copy link

@jit-ci jit-ci bot left a comment

Choose a reason for hiding this comment

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

โŒโ€ƒJit has detected 4 important findings in this PR that you should review.
The findings are detailed below as separate comments.
Itโ€™s highly recommended that you fix these security issues before merge.

Repository Risks:

  • High Severity Findings: Indicates that the resource has high severity security findings that need attention.
  • Production: Critical as it operates in a live production environment, directly impacting users and business operations.

Repository Context:

graph LR
    GitHub$Repository_U23_EnergySage/es-ds["GitHub Repository<br/>EnergySage/es-ds"]:::GitHub$Repository
    Team_U23_Developers["Team<br/>Developers"]:::Team
    Team_U23_Prosumer$Europe["Team<br/>Prosumer Europe"]:::Team
    SQS$Queue_U23_long["SQS Queue<br/>long"]:::SQS$Queue
    AWS$Account_U23_780622972251["AWS Account<br/>780622972251"]:::AWS$Account
    S3$Bucket_U23_es-static-prod["S3 Bucket<br/>es-static-prod"]:::S3$Bucket
    Team_U23_Developers -- "Owns" --> GitHub$Repository_U23_EnergySage/es-ds
    Team_U23_Prosumer$Europe -- "Owns" --> GitHub$Repository_U23_EnergySage/es-ds
    GitHub$Repository_U23_EnergySage/es-ds -- "References" --> SQS$Queue_U23_long
    SQS$Queue_U23_long -- "Is part of" --> AWS$Account_U23_780622972251
    AWS$Account_U23_780622972251 -- "Has" --> S3$Bucket_U23_es-static-prod
Loading

"dependencies": {
"aws-cdk": "^2.90.0",
"aws-cdk-lib": "^2.90.0",
"es-cdk": "^1.20.0",
Copy link

Choose a reason for hiding this comment

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

Security control: License Compliance Checker

License Compliance Violation

Found 1 violation in es-cdk (GPL-3.0-or-later OR MIT):

es-cdk -> aws-cdk-lib -> case (GPL-3.0-or-later OR MIT)

Severity: HIGH


Why should you fix this issue?
This code introduces a dependency vulnerability. In a production environment, using vulnerable dependencies can lead to serious security risks. If an attacker exploits a known vulnerability in one of these dependencies, it could compromise the entire application or lead to unauthorized access.


Jit Bot commands and options (e.g., ignore issue)

You can trigger Jit actions by commenting on this PR review:

  • #jit_ignore_fp Ignore and mark this specific single instance of finding as โ€œFalse Positiveโ€
  • #jit_ignore_accept Ignore and mark this specific single instance of finding as โ€œAccept Riskโ€
  • #jit_ignore_type_in_file Ignore any finding of type "License Compliance Violation" in es-ds-docs/aws/package.json; future occurrences will also be ignored.
  • #jit_undo_ignore Undo ignore command

"format": "npm run format:prettier && npm run format:eslint"
},
"dependencies": {
"@energysage/es-ds-components": "^3.0.0-alpha.15",
Copy link

Choose a reason for hiding this comment

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

Security control: License Compliance Checker

License Compliance Violation

Found 3 violations in @energysage/es-ds-components (BSD-3-Clause OR GPL-2.0):

@energysage/es-ds-components -> nuxt -> nitropack -> listhen -> node-forge (BSD-3-Clause OR GPL-2.0)

@energysage/es-ds-components -> nuxt -> nitropack -> unstorage -> listhen -> node-forge (BSD-3-Clause OR GPL-2.0)

@energysage/es-ds-components -> nuxt -> unstorage -> listhen -> node-forge (BSD-3-Clause OR GPL-2.0)

Severity: HIGH


Why should you fix this issue?
This code introduces a dependency vulnerability. In a production environment, using vulnerable dependencies can lead to serious security risks. If an attacker exploits a known vulnerability in one of these dependencies, it could compromise the entire application or lead to unauthorized access.


Jit Bot commands and options (e.g., ignore issue)

You can trigger Jit actions by commenting on this PR review:

  • #jit_ignore_fp Ignore and mark this specific single instance of finding as โ€œFalse Positiveโ€
  • #jit_ignore_accept Ignore and mark this specific single instance of finding as โ€œAccept Riskโ€
  • #jit_ignore_type_in_file Ignore any finding of type "License Compliance Violation" in es-ds-docs/package.json; future occurrences will also be ignored.
  • #jit_undo_ignore Undo ignore command

"dependencies": {
"@energysage/es-ds-components": "^3.0.0-alpha.15",
"@energysage/es-ds-styles": "^3.0.0-alpha.12",
"@nuxt/image": "^1.8.0",
Copy link

Choose a reason for hiding this comment

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

Security control: License Compliance Checker

License Compliance Violation

Found 2 violations in @nuxt/image (BSD-3-Clause OR GPL-2.0):

@nuxt/image -> ipx -> listhen -> node-forge (BSD-3-Clause OR GPL-2.0)

@nuxt/image -> ipx -> unstorage -> listhen -> node-forge (BSD-3-Clause OR GPL-2.0)

Severity: HIGH


Why should you fix this issue?
This code introduces a dependency vulnerability. In a production environment, using vulnerable dependencies can lead to serious security risks. If an attacker exploits a known vulnerability in one of these dependencies, it could compromise the entire application or lead to unauthorized access.


Jit Bot commands and options (e.g., ignore issue)

You can trigger Jit actions by commenting on this PR review:

  • #jit_ignore_fp Ignore and mark this specific single instance of finding as โ€œFalse Positiveโ€
  • #jit_ignore_accept Ignore and mark this specific single instance of finding as โ€œAccept Riskโ€
  • #jit_ignore_type_in_file Ignore any finding of type "License Compliance Violation" in es-ds-docs/package.json; future occurrences will also be ignored.
  • #jit_undo_ignore Undo ignore command

"private": false,
"type": "module",
"description": "An EnergySage Vue component library",
"main": "./nuxt.config.ts",
Copy link

Choose a reason for hiding this comment

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

Security control: License Compliance Checker

License Compliance Violation

Found 3 violations in nuxt (BSD-3-Clause OR GPL-2.0):

nuxt -> nitropack -> listhen -> node-forge (BSD-3-Clause OR GPL-2.0)

nuxt -> nitropack -> unstorage -> listhen -> node-forge (BSD-3-Clause OR GPL-2.0)

nuxt -> unstorage -> listhen -> node-forge (BSD-3-Clause OR GPL-2.0)

Severity: HIGH


Why should you fix this issue?
This code introduces a dependency vulnerability. In a production environment, using vulnerable dependencies can lead to serious security risks. If an attacker exploits a known vulnerability in one of these dependencies, it could compromise the entire application or lead to unauthorized access.


Jit Bot commands and options (e.g., ignore issue)

You can trigger Jit actions by commenting on this PR review:

  • #jit_ignore_fp Ignore and mark this specific single instance of finding as โ€œFalse Positiveโ€
  • #jit_ignore_accept Ignore and mark this specific single instance of finding as โ€œAccept Riskโ€
  • #jit_ignore_type_in_file Ignore any finding of type "License Compliance Violation" in es-ds-components/package.json; future occurrences will also be ignored.
  • #jit_undo_ignore Undo ignore command

Copy link

@jit-ci jit-ci bot left a comment

Choose a reason for hiding this comment

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

โŒโ€ƒJit has detected 4 important findings in this PR that you should review.
The findings are detailed as separate comments.
Itโ€™s highly recommended that you fix these security issues before merge.

Until now, you ignored/fixed 1 finding.

"format": "npm run format:prettier && npm run format:eslint"
},
"dependencies": {
"@energysage/es-ds-components": "^3.0.0-alpha.17",
Copy link

Choose a reason for hiding this comment

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

Security control: License Compliance Checker

License Compliance Violation

Found 3 violations in @energysage/es-ds-components (BSD-3-Clause OR GPL-2.0):

@energysage/es-ds-components -> nuxt -> nitropack -> listhen -> node-forge (BSD-3-Clause OR GPL-2.0)

@energysage/es-ds-components -> nuxt -> nitropack -> unstorage -> listhen -> node-forge (BSD-3-Clause OR GPL-2.0)

@energysage/es-ds-components -> nuxt -> unstorage -> listhen -> node-forge (BSD-3-Clause OR GPL-2.0)

Severity: HIGH


Why should you fix this issue?
This code introduces a dependency vulnerability. In a production environment, using vulnerable dependencies can lead to serious security risks. If an attacker exploits a known vulnerability in one of these dependencies, it could compromise the entire application or lead to unauthorized access.


Jit Bot commands and options (e.g., ignore issue)

You can trigger Jit actions by commenting on this PR review:

  • #jit_ignore_fp Ignore and mark this specific single instance of finding as โ€œFalse Positiveโ€
  • #jit_ignore_accept Ignore and mark this specific single instance of finding as โ€œAccept Riskโ€
  • #jit_ignore_type_in_file Ignore any finding of type "License Compliance Violation" in es-ds-docs/package.json; future occurrences will also be ignored.
  • #jit_undo_ignore Undo ignore command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants