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: design system implementation #51

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

Conversation

todti
Copy link
Collaborator

@todti todti commented Jan 7, 2025

No description provided.

@todti todti force-pushed the design-system-implementation branch from 9a8a508 to 211017d Compare January 9, 2025 10:47
@todti todti marked this pull request as ready for review January 9, 2025 11:07
@todti todti requested a review from epszaw January 9, 2025 12:28
@@ -0,0 +1,12 @@
import { createRequire } from "node:module";
Copy link
Member

Choose a reason for hiding this comment

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

Actually, we don't have any unit test now. Setup some stub tests for some of components


export default defineConfig({
test: {
include: ["./test/**/*.test.ts"],
Copy link
Member

Choose a reason for hiding this comment

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

Change to ./src/**/*.test.ts because every component will have it's own test file

"eslint-plugin-react": "^7.36.1",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-storybook": "^0.11.1",
"filesize": "^10.1.6",
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure, that every single dependency is used in the project. Check the dependencies and remove unused ones. You can use depcheck, but be careful, it doesn't guarantee, that found packages are really useless

"@allurereport/web-commons": "workspace:*",
"@preact/signals": "^1.3.0",
"d3-shape": "^3.2.0",
"i18next": "^24.0.2",
Copy link
Member

Choose a reason for hiding this comment

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

If we talk about unnecessary dependencies, i18next should be used on the end-project, not on the design system level. Focus on production dependencies

"license": "Apache-2.0",
"author": "Qameta Software",
"type": "module",
"exports": {
Copy link
Member

Choose a reason for hiding this comment

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

Add fonts here and check, that the files can be imported in scss and js files

@@ -0,0 +1,26 @@
@mixin status-bg-and-text {
Copy link
Member

Choose a reason for hiding this comment

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

Think about the mixins vendoring because we actively use them in the applications

Copy link
Member

Choose a reason for hiding this comment

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

For sure, we shouldn't compile them, it should be scss files as is. Maybe, we can create set of css classes, but it requires more changes than keeping the current approach

@@ -0,0 +1,71 @@
pre[class*="language-"],
Copy link
Member

Choose a reason for hiding this comment

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

Convert the file to .scss

@@ -0,0 +1,21 @@
@font-face {
Copy link
Member

Choose a reason for hiding this comment

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

Don't include the file to the design system. Connect the fonts in the storybook, to see the proper view of the components and connect the fonts on the end-project level

@@ -0,0 +1,218 @@
:root {
--font-family: "PTRootUIWebVF", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
Copy link
Member

Choose a reason for hiding this comment

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

Add docs to the readme, which fonts we have to install to reach the proper view of the components. And add notes, that we distribute the fonts in the package

@@ -0,0 +1,5 @@
<svg viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
Copy link
Member

Choose a reason for hiding this comment

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

It would be nice to notice icons in the readme too

@todti todti force-pushed the design-system-implementation branch from 211017d to 6605b40 Compare January 10, 2025 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants