Skip to content

Commit df5376a

Browse files
authored
Add directing pages for unmaintained components (#1810)
* Add directing pages for unmaintained components * Add missing example links * Fixed typo * Fix typo.. again
1 parent e42a033 commit df5376a

File tree

4 files changed

+28
-2
lines changed

4 files changed

+28
-2
lines changed

docuilib/docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula');
1717
trailingSlash: false,
1818
customFields: {
1919
expoSnackLink: 'https://snack.expo.io/@ethanshar/rnuilib_snack?platform=ios&supportedPlatforms=ios,android',
20-
stars: '4'
20+
stars: '4.1'
2121
},
2222
plugins: ['docusaurus-plugin-sass'],
2323
presets: [

scripts/build-docs.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,17 @@ const parentComponents = _.chain(compoundComponents)
2626
components.forEach(component => {
2727
const [componentName, componentParentName] = getComponentNameParts(component.name);
2828
const isParentComponent = parentComponents.includes(componentName);
29+
const isIncubatorComponent = component.category === 'incubator';
2930

3031
let content = '';
32+
3133
/* Markdown Front Matter */
3234
content += `---\n`;
3335
if (isParentComponent) {
3436
content += `sidebar_position: 1\n`;
3537
}
3638
content += `id: ${component.name}\n`;
37-
content += `title: ${component.name}\n`;
39+
content += `title: ${isIncubatorComponent ? 'Incubator.' : ''}${component.name}\n`;
3840
content += `sidebar_label: ${componentName}\n`;
3941
content += `---\n`;
4042

@@ -61,6 +63,12 @@ components.forEach(component => {
6163
content += `:::\n`;
6264
}
6365

66+
if (component.caution) {
67+
content += `:::caution\n`;
68+
content += `${component.caution}\n`;
69+
content += `:::\n`;
70+
}
71+
6472
/* Images */
6573
content += `<div style={{display: 'flex', flexDirection: 'row', overflowX: 'auto', maxHeight: '500px', alignItems: 'center'}}>`;
6674
component.images?.forEach(image => {
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "TextField",
3+
"category": "form",
4+
"description": "A customizable TextField component with validation features",
5+
"example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/TextFieldScreen/InputsScreen.js",
6+
"caution": "Please consider moving to our new TextField implementation and use Incubator.TextField instead",
7+
"images": [],
8+
"props": []
9+
}

src/components/toast/toast.api.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "Toast",
3+
"category": "overlays",
4+
"description": "A customizable Toast component",
5+
"example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/ToastsScreen.js",
6+
"caution": "Please consider moving to our new Toast implementation and use Incubator.Toast instead",
7+
"images": [],
8+
"props": []
9+
}

0 commit comments

Comments
 (0)