-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3044 from raccoongang/Peter_Kulko/alpha-branch-up…
…dating chore: sync alpha to master
- Loading branch information
Showing
2,468 changed files
with
37,826 additions
and
27,826 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,6 @@ dist/ | |
node_modules/ | ||
www/ | ||
icons/ | ||
dependent-usage-analyzer/ | ||
build-scss.js | ||
component-generator/ | ||
example/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
npx lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
# Paragon | ||
|
||
[![Build Status](https://github.com/openedx/paragon/actions/workflows/release.yml/badge.svg)](https://github.com/openedx/paragon/actions/workflows/release.yml) | ||
[![npm_version](https://img.shields.io/npm/v/@edx/paragon.svg)](@edx/paragon) | ||
[![npm_version](https://img.shields.io/npm/v/@openedx/paragon.svg)](@openedx/paragon) | ||
![status](https://img.shields.io/badge/status-Maintained-brightgreen) | ||
![license](https://img.shields.io/github/license/openedx/paragon.svg) | ||
[![codecov](https://codecov.io/gh/edx/paragon/branch/master/graph/badge.svg?token=x1tZmNduy9)](https://codecov.io/gh/edx/paragon) | ||
[![NPM downloads](https://img.shields.io/npm/dw/@edx/paragon)](https://www.npmjs.com/package/@edx/paragon) | ||
[![NPM downloads](https://img.shields.io/npm/dw/@openedx/paragon)](https://www.npmjs.com/package/@openedx/paragon) | ||
|
||
## Purpose | ||
|
||
|
@@ -30,13 +30,13 @@ Paragon components require React 16 or higher. To install Paragon into your proj | |
In terminal: | ||
|
||
``` | ||
npm i --save @edx/paragon | ||
npm i --save @openedx/paragon | ||
``` | ||
|
||
In your React project: | ||
|
||
``` | ||
import { ComponentName } from '@edx/paragon'; | ||
import { ComponentName } from '@openedx/paragon'; | ||
``` | ||
|
||
#### SCSS Foundation | ||
|
@@ -47,7 +47,7 @@ Usage for Open edX and others: | |
|
||
``` | ||
// ... Any custom SCSS variables should be defined here | ||
@import '~@edx/paragon/styles/scss/core/core.scss'; | ||
@import '~@openedx/paragon/styles/scss/core/core.scss'; | ||
``` | ||
|
||
Usage on with `@edx/brand`: | ||
|
@@ -57,7 +57,7 @@ Usage on with `@edx/brand`: | |
``` | ||
@import '~@edx/brand/paragon/fonts.scss'; | ||
@import '~@edx/brand/paragon/variables.scss'; | ||
@import '~@edx/paragon/styles/scss/core/core.scss'; | ||
@import '~@openedx/paragon/styles/scss/core/core.scss'; | ||
@import '~@edx/brand/paragon/overrides.scss'; | ||
``` | ||
|
||
|
@@ -84,7 +84,7 @@ Due to Paragon's dependence on ``react-intl``, that means that your whole app ne | |
|
||
```javascript | ||
import { IntlProvider } from 'react-intl'; | ||
import { messages as paragonMessages } from '@edx/paragon'; | ||
import { messages as paragonMessages } from '@openedx/paragon'; | ||
|
||
ReactDOM.render( | ||
<IntlProvider locale={usersLocale} messages={paragonMessages[usersLocale]}> | ||
|
@@ -99,7 +99,7 @@ Note that if you are using ``@edx/frontend-platform``'s ``AppProvider`` componen | |
```javascript | ||
import { APP_READY, subscribe, initialize } from '@edx/frontend-platform'; | ||
import { AppProvider } from '@edx/frontend-platform/react'; | ||
import { messages as paragonMessages } from '@edx/paragon'; | ||
import { messages as paragonMessages } from '@openedx/paragon'; | ||
import App from './App'; | ||
// this is your app's i18n messages | ||
import appMessages from './i18n'; | ||
|
@@ -151,17 +151,17 @@ module.exports = { | |
dist: The sub-directory of the source code where it puts its build artifact. Often "dist". | ||
*/ | ||
localModules: [ | ||
{ moduleName: '@edx/paragon/styles/scss/core', dir: '../src/paragon', dist: 'styles/scss/core' }, | ||
{ moduleName: '@edx/paragon/icons', dir: '../src/paragon', dist: 'icons' }, | ||
{ moduleName: '@openedx/paragon/styles/scss/core', dir: '../src/paragon', dist: 'styles/scss/core' }, | ||
{ moduleName: '@openedx/paragon/icons', dir: '../src/paragon', dist: 'icons' }, | ||
// Note that using dist: 'dist' will require you to run 'npm build' in Paragon | ||
// to add local changes to the 'dist' directory, so that they can be picked up by the MFE. | ||
// To avoid doing that you can use dist: 'src' to get any local changes hot reloaded on save in the MFE. | ||
{ moduleName: '@edx/paragon', dir: '../src/paragon', dist: 'dist' }, | ||
{ moduleName: '@openedx/paragon', dir: '../src/paragon', dist: 'dist' }, | ||
], | ||
}; | ||
``` | ||
|
||
Then, when importing Paragon's core SCSS in your MFE the import needs to begin with a tilde `~` so that path to your local Paragon repository gets resolved correctly: `@import "~@edx/paragon/styles/scss/core";` | ||
Then, when importing Paragon's core SCSS in your MFE the import needs to begin with a tilde `~` so that path to your local Paragon repository gets resolved correctly: `@import "~@openedx/paragon/styles/scss/core";` | ||
|
||
#### Internationalization | ||
|
||
|
@@ -230,7 +230,8 @@ When developing a new component you should generally follow three rules: | |
variant="primary" | ||
/> | ||
) | ||
} | ||
export default MyFunctionComponent; | ||
``` | ||
|
||
|
@@ -478,7 +479,7 @@ The assigned maintainers for this component and other project details may be fou | |
## Reporting Security Issues | ||
Please do not report security issues in public. Please email [email protected]. | ||
|
||
We tend to prioritize security issues which impact the published `@edx/paragon` NPM library more so than the [documentation website](https://paragon-openedx.netlify.app/) or example React application. | ||
We tend to prioritize security issues which impact the published `@openedx/paragon` NPM library more so than the [documentation website](https://paragon-openedx.netlify.app/) or example React application. | ||
|
||
## Design Tokens | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Paragon | Algolia DocSearch | ||
|
||
This module contains the Algolia DocSearch crawler configuration (i.e., ``crawler-config.js``) that controls the behavior of the Algolia site crawler responsible for indexing content from the Paragon documentation website to the Algolia index. | ||
|
||
Any revisions to the configuration in this module must also be persisted upstream in the Algolia DocSearch crawler configuration. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
/* eslint-disable */ | ||
|
||
// README: When updating the Algolia DocSearch crawler configuration here, it will also need to be updated | ||
// in the Algolia DocSearch crawler editor (https://crawler.algolia.com/). Otherwise, changes to this persisted | ||
// configuration will not actually apply to the Paragon documentation website as intended. | ||
|
||
// Note: there are REDACTED Algolia `appId` and `apiKey` values below; these should not be committed to the repository | ||
// but should be included in the crawler configuration in the Algolia DocSearch crawler editor. | ||
|
||
new Crawler({ | ||
rateLimit: 8, | ||
startUrls: ["https://paragon-openedx.netlify.app/"], | ||
renderJavaScript: false, | ||
sitemaps: [], | ||
ignoreCanonicalTo: false, | ||
discoveryPatterns: ["https://paragon-openedx.netlify.app/**"], | ||
schedule: "every 1 day", | ||
actions: [ | ||
{ | ||
indexName: "paragon-openedx", | ||
pathsToMatch: [ | ||
"https://paragon-openedx.netlify.app/**", | ||
"!https://paragon-openedx.netlify.app/insights/", | ||
"!https://paragon-openedx.netlify.app/status/", | ||
"!https://paragon-openedx.netlify.app/changelog/", | ||
], | ||
recordExtractor: ({ helpers, url, $ }) => { | ||
const category = url.pathname.split("/")[1] || "Documentation"; | ||
return helpers.docsearch({ | ||
recordProps: { | ||
// lvl1: ["header h1", "article h1", "main h1", "h1", "head > title"], | ||
lvl1: ["main h1"], | ||
lvl0: { | ||
selectors: "", | ||
defaultValue: | ||
category.charAt(0).toUpperCase() + category.slice(1), | ||
}, | ||
lvl2: ["main h2"], | ||
lvl3: ["article h3", "main h3", "h3"], | ||
lvl4: ["article h4", "main h4", "h4"], | ||
lvl5: ["article h5", "main h5", "h5"], | ||
lvl6: ["article h6", "main h6", "h6"], | ||
content: ["article p, article li", "main p, main li", "p, li"], | ||
}, | ||
aggregateContent: true, | ||
}); | ||
}, | ||
}, | ||
], | ||
initialIndexSettings: { | ||
"paragon-openedx": { | ||
attributesForFaceting: ["type", "lang"], | ||
attributesToRetrieve: [ | ||
"hierarchy", | ||
"content", | ||
"anchor", | ||
"url", | ||
"url_without_anchor", | ||
"type", | ||
], | ||
attributesToHighlight: ["hierarchy", "hierarchy_camel", "content"], | ||
attributesToSnippet: ["content:10"], | ||
camelCaseAttributes: ["hierarchy", "hierarchy_radio", "content"], | ||
searchableAttributes: [ | ||
"unordered(hierarchy_radio_camel.lvl0)", | ||
"unordered(hierarchy_radio.lvl0)", | ||
"unordered(hierarchy_radio_camel.lvl1)", | ||
"unordered(hierarchy_radio.lvl1)", | ||
"unordered(hierarchy_radio_camel.lvl2)", | ||
"unordered(hierarchy_radio.lvl2)", | ||
"unordered(hierarchy_radio_camel.lvl3)", | ||
"unordered(hierarchy_radio.lvl3)", | ||
"unordered(hierarchy_radio_camel.lvl4)", | ||
"unordered(hierarchy_radio.lvl4)", | ||
"unordered(hierarchy_radio_camel.lvl5)", | ||
"unordered(hierarchy_radio.lvl5)", | ||
"unordered(hierarchy_radio_camel.lvl6)", | ||
"unordered(hierarchy_radio.lvl6)", | ||
"unordered(hierarchy_camel.lvl0)", | ||
"unordered(hierarchy.lvl0)", | ||
"unordered(hierarchy_camel.lvl1)", | ||
"unordered(hierarchy.lvl1)", | ||
"unordered(hierarchy_camel.lvl2)", | ||
"unordered(hierarchy.lvl2)", | ||
"unordered(hierarchy_camel.lvl3)", | ||
"unordered(hierarchy.lvl3)", | ||
"unordered(hierarchy_camel.lvl4)", | ||
"unordered(hierarchy.lvl4)", | ||
"unordered(hierarchy_camel.lvl5)", | ||
"unordered(hierarchy.lvl5)", | ||
"unordered(hierarchy_camel.lvl6)", | ||
"unordered(hierarchy.lvl6)", | ||
"content", | ||
], | ||
distinct: true, | ||
attributeForDistinct: "url", | ||
customRanking: [ | ||
"desc(weight.pageRank)", | ||
"desc(weight.level)", | ||
"asc(weight.position)", | ||
], | ||
ranking: [ | ||
"words", | ||
"filters", | ||
"typo", | ||
"attribute", | ||
"proximity", | ||
"exact", | ||
"custom", | ||
], | ||
highlightPreTag: '<span class="algolia-docsearch-suggestion--highlight">', | ||
highlightPostTag: "</span>", | ||
minWordSizefor1Typo: 3, | ||
minWordSizefor2Typos: 7, | ||
allowTyposOnNumericTokens: false, | ||
minProximity: 1, | ||
ignorePlurals: true, | ||
advancedSyntax: true, | ||
attributeCriteriaComputedByMinProximity: true, | ||
removeWordsIfNoResults: "allOptional", | ||
}, | ||
}, | ||
appId: "", // REDACTED | ||
apiKey: "", // REDACTED | ||
extraUrls: [ | ||
"https://paragon-openedx.netlify.app/foundations/colors", | ||
"https://paragon-openedx.netlify.app/foundations/elevation", | ||
"https://paragon-openedx.netlify.app/foundations/typography", | ||
"https://paragon-openedx.netlify.app/foundations/css-utilities", | ||
"https://paragon-openedx.netlify.app/foundations/responsive", | ||
"https://paragon-openedx.netlify.app/foundations/brand-icons", | ||
"https://paragon-openedx.netlify.app/guides/installation-and-usage", | ||
"https://paragon-openedx.netlify.app/tools/component-generator", | ||
"https://paragon-openedx.netlify.app/playground", | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.