nordcloud / gnui Goto Github PK
View Code? Open in Web Editor NEW๐ Nordcloud's design system for SaaS products.
Home Page: https://master.du3gff836giqw.amplifyapp.com/
License: MIT License
๐ Nordcloud's design system for SaaS products.
Home Page: https://master.du3gff836giqw.amplifyapp.com/
License: MIT License
What problem does this feature solve?
There is a lack of HTML attributes in Button types src/components/button/Button.tsx
What is expected?
The button should accept all HTML attributes and all existing custom props.
The parameters.options.showRoots
option is deprecated and set to change in v7 for StoryBook. The current location changes to be under sidebar namespace. I have made a PR to address these changes as well.
What problem does this feature solve?
There is a duplication, setColor function has been declared in all components where is used.
What is expected?
Global setColor function in utils. Refactor all usage of this function and replace it to the global one.
https://github.com/santosfrancisco/react-awesome-styled-grid
Has some issues that require using patch-package
- santosfrancisco/react-awesome-styled-grid#138
It would be great to find a replacement with similar capabilities (grid + media quey utils), requirements:
Tasks:
react-awesome-styled-grid
@typescript-eslint/no-explicit-any
and fp/no-mutation
warningsCheck out https://blog.agney.dev/styled-components-&-typescript/
https://github.com/nordcloud/GNUI/tree/master/src/components/timeRangePicker
https://master.du3gff836giqw.amplifyapp.com/?path=/docs/forms-timerangepicker--timerangepicker
Tasks:
TimeRangePicker
component, example scenarios:
calendar
, range list of days is properly adjustedto
earlier than from
)https://github.com/nordcloud/GNUI/tree/master/src/components/button
https://master.du3gff836giqw.amplifyapp.com/?path=/docs/components-button--default-story
Tasks:
ButtonIcon
based on provided initialState
severity medium/low
as="a"
, linkTo
, href
)Add proper types inside:
All @typescript-eslint/no-explicit-any
warnings should be resolved in those files
Prop types need to be improved, so Typescript takes props from element passed as polymorphic component ("as").
This could be tricky considering linkTo
prop.
Useful resource: https://react-typescript-cheatsheet.netlify.app/docs/advanced/patterns_by_usecase#polymorphic-components-eg-with-as-props
download
attribute should be available when we pass anchor as a polymorphic element.
<Button as="a" download />
It shouldn't be available when the default element ("button") is used, e.g.
// This throws error
<Button download />
https://github.com/nordcloud/GNUI/tree/master/src/components/tabs
https://master.du3gff836giqw.amplifyapp.com/?path=/docs/components-tabs--default-story
Tasks:
Tabs
component, example scenarios:
Tabs
change on click, active styles are appliedTab
becomes activeTab
is not interactiveFile src/utils/svgicons.tsx
contains React jsx icon paths, the paths should be moved to the IconPaths folder inside components/, then imported and returned inside svgicons.tsx file.
Some components take only a few props that are required for logic inside their code, they should spread all of the remaining props that was passed into them to the native html element, you should also remove redundant native attributes/event handlers from props type interface and extend it with the one provided by React.
You can see how it should be done inside
src/components/checkbox/Checkbox.tsx
src/components/switch/Switch.tsx
Components to refactor:
@typescript-eslint/no-explicit-any
warnings should be resolved in this fileRecently, when using Klarity on API keys view, I've stumbled upon the case when Popover does not change it's visibility when clicking on other Popovers triggers.
I was able to reproduce the behaviour in Storybook with multiple Popovers and by clicking the triggers including their icons. Posting recording below.
@typescript-eslint/no-explicit-any
warnings should be resolved in this fileThe Preview
block for StoryBook is deprecated in favor of Canvas as of v6.0.0, which is the current release. I have made a PR to address these changes as well.
https://github.com/nordcloud/GNUI/tree/master/src/components/modal
https://master.du3gff836giqw.amplifyapp.com/?path=/docs/components-modal--basic-modal
Tasks:
Modal
component, example scenarios:
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
@storybook/addon-essentials
, @storybook/addon-mdx-gfm
, @storybook/blocks
, @storybook/react
, @storybook/react-vite
, @storybook/theming
, storybook
)stylelint
, stylelint-config-recommended
)These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
@storybook/addon-essentials
, @storybook/addon-mdx-gfm
, @storybook/addons
, @storybook/blocks
, @storybook/react
, @storybook/react-vite
, @storybook/theming
, storybook
)lockfile-lint
, npm-run-all
, prettier
)package.json
@types/styled-system ^5.1.22
date-fns ^2.30.0
lodash.clonedeep ^4.5.0
polished ^4.2.2
react-content-loader ^6.2.1
react-day-picker ^8.8.2
react-helmet ^6.1.0
react-if ^4.1.5
react-select ^5.7.7
styled-components-breakpoint ^3.0.0-preview.20
styled-system ^5.1.5
@nordcloud/eslint-config-pat ^9.3.0
@rollup/plugin-commonjs ^25.0.7
@rollup/plugin-node-resolve ^15.2.3
@storybook/addon-essentials ^7.6.7
@storybook/addon-mdx-gfm ^7.6.7
@storybook/addons ^7.6.7
@storybook/blocks ^7.6.7
@storybook/react ^7.6.7
@storybook/react-vite ^7.6.7
@storybook/theming ^7.6.7
@testing-library/jest-dom ^6.3.0
@testing-library/react ^14.0.0
@testing-library/user-event ^13.5.0
@types/lodash.clonedeep ^4.5.9
@types/node ^18.19.4
@types/react ^18.2.23
@types/react-copy-to-clipboard ^5.0.7
@types/react-dom ^18.2.8
@types/react-helmet ^6.1.11
@types/styled-components ^5.1.34
eslint ^8.56.0
husky ^8.0.3
jsdom ^22.1.0
knip ^2.43.0
lint-staged ^13.3.0
lockfile-lint ^4.12.1
npm-run-all ^4.1.5
patch-package ^6.5.1
prettier ^3.1.1
react ^18.2.0
react-awesome-styled-grid ^3.1.4
react-copy-to-clipboard ^5.1.0
react-dom ^18.2.0
rollup ^3.29.4
rollup-plugin-typescript2 ^0.36.0
storybook ^7.6.7
styled-components ^5.3.11
stylelint ^13.13.1
stylelint-config-recommended ^5.0.0
stylelint-config-styled-components ^0.1.1
stylelint-processor-styled-components ^1.10.0
typescript ^5.2.2
vite ^4.4.9
vitest ^0.34.6
node ~18.12.0 || ~18.13.0
@babel/traverse ~7.23.7
minimist ~1.2.8
shell-quote ~1.7.3
terser ~4.8.1
tmpl ~1.0.5
trim ~0.0.3
y18n ~4.0.3
hosted-git-info ~2.8.9
ssri ~6.0.2
elliptic ~6.5.4
path-parse ~1.0.7
json5 ^1.0.2
decode-uri-component ^0.2.1
react/function-component-definition
rule are resolvedMore info on the topic https://kentcdodds.com/blog/how-to-write-a-react-component-in-typescript
@typescript-eslint/no-explicit-any
warnings should be resolved in this filehttps://github.com/nordcloud/GNUI/tree/master/src/components/dropdown
https://master.du3gff836giqw.amplifyapp.com/?path=/docs/forms-dropdown--dropdown
Tasks:
Dropdown
component, example test cases:
X
button)The Switch component's last example in Storybook didn't include a readyOnly attribute and React was giving an error about assuming mutability instead of the developer making it explicit. I have made a PR to address these changes as well.
Right now, all of the *.stories.mdx
files reside inside src/stories folder,
please move every story to its component folder.
Icon components are in the utils/ folder
src/utils/decos.tsx
Move them to the components/
Right now, we use Typescript compilation to create dist
folder that gets published.
"compile:publish": "tsc --project tsconfig.publish.json"
We should introduce proper bundler (https://rollupjs.org/ is preferred for libraries) and create proper config for bundling & releasing the package.
https://github.com/nordcloud/GNUI/tree/master/src/components/tooltip
https://master.du3gff836giqw.amplifyapp.com/?path=/docs/components-tooltip--default-story
Tasks:
Tooltip
component, scenarios:
position
prop (position: right/left, bottom: true/false)caption
is properly displayedRemove:
src/utils/wInfo.ts
src/utils/img
The Input component example in Storybook didn't include a readyOnly attribute and React was giving an error about assuming mutability instead of the developer making it explicit. I have made a PR to address these changes as well.
What problem does this feature solve?
There is no consistency in types.
What is expected?
Change all types if possible from an interface to type.
Change naming convention to Pascal Case and Props or Data prefix.
What problem does this feature solve?
There is a typo in the word IBackgroudProps src/components/modal/types.ts and other places where this type is imported.
What is expected?
To remove typo.
The goal of this task is to create universal style of importing React
and using React
apis to be easily distinguished from the rest of the code (e.g. built-in hooks vs custom hooks).
React
imports to namespace import - import * as React from React;
React
api usages to the new import style e.g.React.useEffect(() =>
instead of useEffect(() =>
or React.ReactNode
instead of ReactNode
There's a handy hook that we use in our internal projects that is used to handle boolean states.
import { useCallback, useState } from "react";
export function useDisclosure(isOpenDefault = false) {
const [isOpen, setIsOpen] = useState(isOpenDefault);
const open = useCallback(() => setIsOpen(true), []);
const close = useCallback(() => setIsOpen(false), []);
const toggle = useCallback((toSet?: boolean) => {
if (typeof toSet === "undefined") {
setIsOpen((state) => !state);
} else {
setIsOpen(toSet);
}
}, []);
return { isOpen, open, close, toggle };
}
Tasks:
src/hooks
useDisclosure
useState(false)
or useState(true)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.