+
+
+
+
+ {card.status == 'archived' ? (
+
+ ) : (
+
+ )}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
};
-export default IdeaSettingsCard;
\ No newline at end of file
+export default IdeaSettingsCard;
diff --git a/apps/ideaspace/src/utils/StrapiHelper.js b/apps/ideaspace/src/utils/StrapiHelper.js
index af8f08063..1dc3faae8 100644
--- a/apps/ideaspace/src/utils/StrapiHelper.js
+++ b/apps/ideaspace/src/utils/StrapiHelper.js
@@ -1,7 +1,21 @@
export function cleanData(data) {
- return { id: data.id, ...data?.attributes };
+ return { id: data.id, ...data?.attributes };
}
export function cleanDataList(dataList) {
- return dataList.map(data => cleanData(data));
-}
\ No newline at end of file
+ return dataList.map((data) => cleanData(data));
+}
+
+export function packageData(data) {
+ const result = { data };
+ delete result.data.id;
+ return result;
+}
+
+export function cleanIdeaForPost(card) {
+ let idea = packageData(card);
+ idea.data.author = idea.data.author.id;
+ idea.data.ideaOwner = idea.data.ideaOwner.id;
+ idea.data.comments = idea.data.comments.data.map((c) => c.id);
+ return idea;
+}
diff --git a/packages/UI/.storybook/main.ts b/packages/UI/.storybook/main.ts
index b825666bf..ebd51f5e7 100644
--- a/packages/UI/.storybook/main.ts
+++ b/packages/UI/.storybook/main.ts
@@ -2,7 +2,7 @@ import type { StorybookConfig } from '@storybook/nextjs';
import path, { dirname, join } from 'path';
const config: StorybookConfig = {
- stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)', '../src/**/*.mdx'],
+ stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
staticDirs: ['../public'],
addons: [
'@storybook/addon-essentials',
@@ -10,10 +10,10 @@ const config: StorybookConfig = {
'@storybook/addon-links',
'@storybook/addon-mdx-gfm',
'@storybook/addon-designs',
- 'storybook-addon-pseudo-states'
+ 'storybook-addon-pseudo-states',
].map(getAbsolutePath),
framework: {
- name: getAbsolutePath('@storybook/nextjs') as "@storybook/nextjs",
+ name: getAbsolutePath('@storybook/nextjs') as '@storybook/nextjs',
options: {},
},
webpackFinal: async (config) => {
@@ -38,17 +38,17 @@ const config: StorybookConfig = {
// pull radix-ui props declaration files
if (prop.parent?.fileName.includes('@radix-ui')) return true;
// ignore rest of node_modules props declaration file
- return (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true)
+ return prop.parent ? !/node_modules/.test(prop.parent.fileName) : true;
},
},
reactDocgen: 'react-docgen-typescript',
// skipBabel: true,
check: true,
- }
+ },
};
function getAbsolutePath(value) {
return dirname(require.resolve(join(value, 'package.json')));
}
-export default config;
\ No newline at end of file
+export default config;
diff --git a/packages/UI/.storybook/preview-head.html b/packages/UI/.storybook/preview-head.html
index 171fd5946..4526d44fb 100644
--- a/packages/UI/.storybook/preview-head.html
+++ b/packages/UI/.storybook/preview-head.html
@@ -1,13 +1,13 @@
-
-
-
-
+
+
+
+
diff --git a/packages/UI/CONTRIBUTING.md b/packages/UI/CONTRIBUTING.md
index 7827fbd78..1122a8bf5 100644
--- a/packages/UI/CONTRIBUTING.md
+++ b/packages/UI/CONTRIBUTING.md
@@ -1,62 +1,97 @@
# Getting started with the Platform Enablement Team
-dev-launchers-platform is a mono repo using yarn. All yarn script lines need to be run in the root folder.
+dev-launchers-platform is a mono repo using yarn. All yarn script lines need to be run in the root folder.
+
+## 🔎 What's inside?
+
+A quick look at the top-level files and directories included in this package.
+
+ .
+ ├── node_modules
+ ├── public
+ ├── src
+ ├── .gitignore
+ ├── .env
+ ├── LICENSE
+ ├── package.json
+ ├── CONTRIBUTING.md
+ └── README.md
+
+1. **`node_modules`**: This directory contains all of the modules of code that your project depends on (npm packages).
+
+2. **`public`**: This directory will contain static files that can be accessed directly via the browser using a path relative to storybook base URL.
+
+3. **`src`**: This directory will contain all of the code related to what you will see on your application.
+
+4. **`.env`**: This file will contain the necessary environment variables for your application.
+
+5. **`.gitignore`**: This file tells git which files it should not track or maintain during the development process of your project.
+
+6. **`LICENSE`**: The template is licensed under the MIT licence.
+
+7. **`package.json`**: Standard manifest file for Node.js projects, which typically includes project specific metadata (such as the project's name, the author among other information). It's based on this file that npm will know which packages are necessary to the project.
+
+8. **`README.md`**: A text file containing useful reference information about the project.
+
+9. **`CONTRIBUTING.md`**: A markdown file containing useful guides for contributing to the design system effectively.
+
+## Contribute
+
+If you encounter an issue with the components found in this system, we encourage you to open an issue with the Platform Enablement label or simply click [here](https://github.com/dev-launchers/dev-launchers-platform/issues/new?label=%22Platform%20Enablement%22).
+
+## Learning Storybook
+
+1. Read the offical introductory tutorial over at [Storybook tutorials](https://storybook.js.org/tutorials/intro-to-storybook/react/en/get-started/).
+2. Learn how to transform your component libraries into design systems in our [Design Systems for Developers](https://storybook.js.org/tutorials/design-systems-for-developers/) tutorial.
+3. See official documentation for [Storybook](https://storybook.js.org/).
## Installing and quick started
-1. install yarn, below are several ways to install.
- - In a terminal with admin run ```$ corepack enable```
- - ```$ npm install --global yarn```
-2. clone the repo @ https://github.com/dev-launchers/dev-launchers-platform
-3. After cloning repo, navigate to /dev-launchers-platform
-4. ```$ yarn install``` in the root folder to install dependencies
-5. Open a new terminal and run ```$ yarn workspace @devlaunchers/tailwind dev```. to start tailwind constructor.
-5. Open a 2nd terminal and run ```$ yarn workspace @devlaunchers/components storybook``` to start storybook.
-7. Start Development work.
+1. install yarn, below are several ways to install.
-### Yarn scripts for this team
+ - In a terminal with admin run `$ corepack enable`
-```
-$ yarn workspace @devlaunchers/tailwind dev
-$ yarn workspace @devlaunchers/components storybook
-$ yarn workspace @devlaunchers/components typecheck
-```
-More scripts are located in the package.json file.
+2. clone the repo @ https://github.com/dev-launchers/dev-launchers-platform
+3. After cloning repo, navigate to /dev-launchers-platform
+4. `$ yarn install` in the root folder to install dependencies
+5. Open a new terminal and run `$ yarn workspace @devlaunchers/tailwind dev`. to start tailwind constructor.
+6. Open a 2nd terminal and run `$ yarn workspace @devlaunchers/components storybook` to start storybook.
+7. Start Development work.
### Installing packages
-To install a package into a specific workspace:
+To install a package to the design system:
$ yarn workspace @devlaunchers/ add
#### Installing Radix-ui components
-Radix-ui components need to be installed individually, if you are not able to import @radix-ui follow the command below to install in devlaunchers components workspace.
+> Radix UI is an open-source UI component library for building high-quality, accessible design systems and web apps.
+> Radix Primitives is a low-level UI component library with a focus on accessibility, customization and developer experience.
- $ yarn workspace @devlaunchers/components add
+We use these low level UI components as the base layer of our design system, so when you get to build a component from our [figma style guide file](https://www.figma.com/file/EwzuhhvTulvFRMvhTD5VAh/DL-Universal-Design-System) make sure to use radix ui whenever possible!
-Below is the command to install radix-ui/react-checkbox
+Below is the command to install radix-ui/react-checkbox for example
$ yarn workspace @devlaunchers/components add @radix-ui/react-checkbox
-
# Boards and issues.
### Issues in github
-When looking at issues in github, you will want to filter by Platform Enablement.
+When looking at issues in github, you will want to filter by Platform Enablement.
https://github.com/dev-launchers/dev-launchers-platform/issues?q=is%3Aopen+is%3Aissue+label%3A%22Platform+Enablement%22
### Zenhub
-Platform Enablement Team uses zenhub as it's board. If this link does not work msg lead to invite you to the team.
+Platform Enablement Team uses zenhub as it's board. If this link does not work contact enjoy2live on discord to invite you to the team.
https://app.zenhub.com/workspaces/platform-enablement-63529f02029ee50018fe58c6/board
## Git branch checkout flow
-We will be working out of development/components.
+We will be working out of development/components.
$ git checkout development/components
@@ -66,12 +101,11 @@ We will be working out of development/components.
$ git checkout -b components/newBranchName
-
## Figma
Go to universal Figma @:
- https://www.figma.com/file/EwzuhhvTulvFRMvhTD5VAh/DL-Universal-Design-System?type=design&t=w1PSPgQunxcd19Bz-6
+ https://www.figma.com/file/EwzuhhvTulvFRMvhTD5VAh/DL-Universal-Design-System
- All component designs will be coming from the universal UI library.
- Make sure dev mode is toggled in Figma.
@@ -79,23 +113,21 @@ Go to universal Figma @:
## Vscode extensions
-```extensions.json``` in this workspace will recommend the follow extensions when you first open the workspace:
+`extensions.json` in this workspace will recommend the follow extensions when you first open the workspace:
1. Tailwind css intellisense
2. Eslint
3. ES7 + React/redux/React-native snippets.
4. Figma for vs code
-
-
### Storybook snippet
By typing "story" in an empty file, you can get the below snippet as a starter for storybook files. When thes snippet is imported it will have selected all the parts needs to type in your Component.
-```
-import type { Meta, StoryObj } from '@storybook/react';
+```jsx
+import type { Meta, StoryObj } from "@storybook/react";
-import Component from './Component';
+import Component from "./Component";
const meta: Meta = {
component: Component,
@@ -114,7 +146,7 @@ export const Primary: Story = {
};
```
-## Storybook & tailwind dev environment.
+## Storybook & tailwind dev environment.
In a terminal, in order to get tailwind classes in your project you will need to run the dev command.
@@ -124,55 +156,43 @@ Storybook will be the primary way you will see your design changes. Running "com
$ yarn workspace @devlaunchers/components storybook
-
-
## Creating new components in project.
When creating the folder/files in src/components :
-- The Project Components folder should match the Figma design location
- - Example "src/components/Checkbox"
+- The Project Components folder should match the Figma design location
+ - Example "src/components/Checkbox"
- Project Components names should match the design Name - "Capitalized"
- - Example "src/components/Checkbox/Checkbox.tsx"
+ - Example "src/components/Checkbox/Checkbox.tsx"
- Project components need a #.stories.tsx to work with storybook.
- find a template or copy from another stories.tsx
-- Create an index.ts file for exporting the tsx files.
- ```
- export { default as Alert } from './Alert';
- export type {AlertProp} from './Alert'
- ```
-
-
-## Adding assets
-
-For .tsx assets check the need too re-export all components into an index.ts for exporting in the folder that it is living in.
-
-```
-packages/UI/src/assets/icons/index.ts
-```
-
+- Create an index.ts file for exporting the tsx files.
+ ```
+ export { default as Alert } from './Alert';
+ export type {AlertProp} from './Alert'
+ ```
## Jsdocs auto intergration with storybook.
-Attempt to put all documentation via jsdocs. Storybook will auto import depending on the location of the jsdocs. Make it so documenation is only in one location in code, and both storybook and jsdocs draw from the same location.
-
-As a example - Tabs story in storybook will grab this jsdocs, at the same time it will be shown by a description in mouse hover.
+Try to always add jsdocs description to each prop of your component type defination, this will allow developers to know how use the component props right within their code editor and storybook will also be able to pick it up and auto document the component you built for you.
-![Example Image](example.png)
+
+
+
## Submit the branch with a new pull request.
In git bash, you will want to do the git push flow.
- - git add .
- - Git commit -m "describes what you worked on"
- - git push origin branch
+- git add .
+- git commit -m "describes what you worked on"
+- git push origin branch
Go to github.com and make sure you are logged in and in the right repo.
https://github.com/dev-launchers/dev-launchers-platform
- - Go to "Pull Requests" tab.
- - Create new "Pull request"
- - the base branch is "development/components"
- - the compare branch is your new branch
- - Rest on technical lead to merge or give feedback.
+- Go to "Pull Requests" tab.
+- Create new "Pull request"
+- the base branch is "development/components"
+- the compare branch is your new branch
+- Rest on technical lead to merge or give feedback.
diff --git a/packages/UI/README.md b/packages/UI/README.md
index 38e90dde4..33dc6b82f 100644
--- a/packages/UI/README.md
+++ b/packages/UI/README.md
@@ -1,83 +1,39 @@
-
- Chromatic's Design Systems for Developers tutorial template
+ Devlaunchers Design System
-This template ships with the main React configuration files you'll need to get up and running fast.
+Components, styles, and utilities are the core of the Devlaunchers brand shared across its websites. They're most notably used on [devlaunchers.org](https://devlaunchers.org) but are also found on our internal websites and tools.
-## đźš… Quick start
+This storybook represents components found in the Devlaunchers monorepo, specifically the [@devlaunchers/components](https://github.com/dev-launchers/dev-launchers-platform/tree/master/packages/UI) package and derived from the amazing work of the universal design team's [figma file](https://www.figma.com/file/EwzuhhvTulvFRMvhTD5VAh/DL-Universal-Design-System).
-1. **Create the application.**
+Its organization roughly aligns with variations of [Atomic Design](https://bradfrost.com/blog/post/atomic-web-design/).
- Use [degit](https://github.com/Rich-Harris/degit) to get this template.
-
- ```shell
- # Clone the template
- npx degit chromaui/learnstorybook-design-system-template learnstorybook-design-system
- ```
+## 🚀 Quick start
1. **Install the dependencies.**
- Navigate into your new site’s directory and install the necessary dependencies.
-
```shell
- # Navigate to the directory
- cd learnstorybook-design-system/
-
- # Install the dependencies
yarn
```
-1. **Open the source code and start editing!**
-
- Open the `learnstorybook-design-system` directory in your code editor of choice and building your first component!
-
-## 🔎 What's inside?
-
-A quick look at the top-level files and directories included with this template.
-
- .
- ├── node_modules
- ├── public
- ├── src
- ├── .gitignore
- ├── .env
- ├── LICENSE
- ├── package.json
- ├── yarn.lock
- └── README.md
+1. **Spin up a development server.**
+ In order to see how to use a certain component you have to start a local development server of storybook.
-1. **`node_modules`**: This directory contains all of the modules of code that your project depends on (npm packages).
-
-2. **`public`**: This directory will contain the development and production build of the site.
-
-3. **`src`**: This directory will contain all of the code related to what you will see on your application.
-
-4. **`.env`**: This file will contain the necessary environment variables for your application.
-
-5. **`.gitignore`**: This file tells git which files it should not track or maintain during the development process of your project.
-
-6. **`LICENSE`**: The template is licensed under the MIT licence.
-
-7. **`package.json`**: Standard manifest file for Node.js projects, which typically includes project specific metadata (such as the project's name, the author among other information). It's based on this file that npm will know which packages are necessary to the project.
+ ```shell
+ yarn workspace @devlaunchers/components storybook
+ ```
-8. **`yarn.lock`**: This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. **(Do not change it manually).**
+1. **Start using components!**
-9. **`README.md`**: A text file containing useful reference information about the project.
+ Open http://localhost:6006 in your browser (should happen automatically) and start reading the documentation from within storybook.
## Contribute
-If you encounter an issue with the template, we encourage you to open an issue in this template's repository.
-
-## Learning Storybook
-
-1. Read our introductory tutorial over at [Storybook tutorials](https://storybook.js.org/tutorials/intro-to-storybook/react/en/get-started/).
-2. Learn how to transform your component libraries into design systems in our [Design Systems for Developers](https://storybook.js.org/tutorials/design-systems-for-developers/) tutorial.
-2. See our official documentation at [Storybook](https://storybook.js.org/).
\ No newline at end of file
+If you encounter an issue with the components found in this system, we encourage you to open an issue with the Platform Enablement label or simply click [here](https://github.com/dev-launchers/dev-launchers-platform/issues/new?label=%22Platform%20Enablement%22).
diff --git a/packages/UI/example.png b/packages/UI/example.png
deleted file mode 100644
index 3271be235..000000000
Binary files a/packages/UI/example.png and /dev/null differ
diff --git a/packages/UI/package.json b/packages/UI/package.json
index 608c16b9a..b792d19c8 100644
--- a/packages/UI/package.json
+++ b/packages/UI/package.json
@@ -10,6 +10,7 @@
"@radix-ui/react-checkbox": "1.0.4",
"@radix-ui/react-dialog": "1.0.5",
"@radix-ui/react-dropdown-menu": "2.0.6",
+ "@radix-ui/react-progress": "1.0.3",
"@radix-ui/react-switch": "1.0.3",
"@radix-ui/react-tabs": "1.0.4",
"axios": "^0.27.2",
@@ -21,6 +22,7 @@
"iso8601-duration": "2.1.2",
"lucide-react": "0.314.0",
"next": "^12.2.3",
+ "next-share": "0.27.0",
"polished": "^4.2.2",
"react": "^17.0.2",
"react-burger-menu": "^3.0.8",
diff --git a/packages/UI/public/android-chrome-192x192.png b/packages/UI/public/android-chrome-192x192.png
new file mode 100644
index 000000000..cfd837b80
Binary files /dev/null and b/packages/UI/public/android-chrome-192x192.png differ
diff --git a/packages/UI/public/android-chrome-512x512.png b/packages/UI/public/android-chrome-512x512.png
new file mode 100644
index 000000000..ed0b6790a
Binary files /dev/null and b/packages/UI/public/android-chrome-512x512.png differ
diff --git a/packages/UI/public/apple-touch-icon.png b/packages/UI/public/apple-touch-icon.png
new file mode 100644
index 000000000..bc28234f8
Binary files /dev/null and b/packages/UI/public/apple-touch-icon.png differ
diff --git a/packages/UI/public/browserconfig.xml b/packages/UI/public/browserconfig.xml
new file mode 100644
index 000000000..ba08c67f4
--- /dev/null
+++ b/packages/UI/public/browserconfig.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+ #ff8000
+
+
+
diff --git a/packages/UI/public/favicon-16x16.png b/packages/UI/public/favicon-16x16.png
new file mode 100644
index 000000000..6b2673ac9
Binary files /dev/null and b/packages/UI/public/favicon-16x16.png differ
diff --git a/packages/UI/public/favicon-32x32.png b/packages/UI/public/favicon-32x32.png
new file mode 100644
index 000000000..41ed327c9
Binary files /dev/null and b/packages/UI/public/favicon-32x32.png differ
diff --git a/packages/UI/public/favicon.ico b/packages/UI/public/favicon.ico
index a11777cc4..48b8fa56e 100644
Binary files a/packages/UI/public/favicon.ico and b/packages/UI/public/favicon.ico differ
diff --git a/packages/UI/public/images/logo-monogram.png b/packages/UI/public/images/logo-monogram.png
new file mode 100644
index 000000000..8d968e842
Binary files /dev/null and b/packages/UI/public/images/logo-monogram.png differ
diff --git a/packages/UI/public/index.html b/packages/UI/public/index.html
index 1837da27f..82c265131 100644
--- a/packages/UI/public/index.html
+++ b/packages/UI/public/index.html
@@ -1,20 +1,50 @@
-
-
-
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
- React App
+ Dev Launchers Design System
+
-
+