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

Remove Polyfills section from sidebar #8293

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Accessibility.md
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ title: Accessibility
layout: docs
category: Guides
permalink: docs/accessibility.html
next: direct-manipulation
next: timers
---

## Native App Accessibility (iOS and Android)
2 changes: 1 addition & 1 deletion docs/Basics-Component-ListView.md
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ title: ListView
layout: docs
category: Basics
permalink: docs/basics-component-listview.html
next: basics-integration-with-existing-apps
next: basics-network
---

On mobile devices, lists are a core element in many applications. The [`ListView`](/react-native/docs/listview.html#content) component is a special type of [`View`](/react-native/docs/basics-component-view.html) that displays a *vertically* scrolling list of changing, but similarly structured, data.
8 changes: 4 additions & 4 deletions docs/Network.md → docs/Basics-Network.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
id: network
id: basics-network
title: Network
layout: docs
category: Polyfills
category: Basics
permalink: docs/network.html
next: timers
next: basics-integration-with-existing-apps
---

One of React Native's goals is to be a playground where we can experiment with different architectures and crazy ideas. Since browsers are not flexible enough, we had no choice but to reimplement the entire stack. In the places that we did not intend to change anything, we tried to be as faithful as possible to the browser APIs. The networking stack is a great example.
@@ -122,7 +122,7 @@ request.open('GET', 'https://mywebsite.com/endpoint.php');
request.send();
```

You can also use -
You can also use -

```js
var request = new XMLHttpRequest();
3 changes: 2 additions & 1 deletion docs/Colors.md
Original file line number Diff line number Diff line change
@@ -2,8 +2,9 @@
id: colors
title: Colors
layout: docs
category: Polyfills
category: Guides
permalink: docs/colors.html
next: images
---

The following formats are supported:
2 changes: 1 addition & 1 deletion docs/Style.md
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ title: Style
layout: docs
category: Guides
permalink: docs/style.html
next: images
next: colors
---

React Native doesn't implement CSS but instead relies on JavaScript to let you style your application. This has been a controversial decision and you can read through those slides for the rationale behind it.
4 changes: 2 additions & 2 deletions docs/Timers.md
Original file line number Diff line number Diff line change
@@ -2,9 +2,9 @@
id: timers
title: Timers
layout: docs
category: Polyfills
category: Guides
permalink: docs/timers.html
next: colors
next: direct-manipulation
---

Timers are an important part of an application and React Native implements the [browser timers](https://developer.mozilla.org/en-US/Add-ons/Code_snippets/Timers).
20 changes: 6 additions & 14 deletions website/server/extractDocs.js
Original file line number Diff line number Diff line change
@@ -159,9 +159,8 @@ function getNextComponent(idx) {
} else {
return getNextComponent(idx + 1);
}
} else {
return 'network';
}
return null;
}

function componentsToMarkdown(type, json, filepath, idx, styles) {
@@ -185,8 +184,8 @@ function componentsToMarkdown(type, json, filepath, idx, styles) {
json.methods = json.methods.filter(filterMethods);
}

// Put Flexbox into the Polyfills category
const category = (type === 'style' ? 'Polyfills' : type + 's');
// Put styles (e.g. Flexbox) into the API category
const category = (type === 'style' ? 'apis' : type + 's');
const next = getNextComponent(idx);

const res = [
@@ -499,6 +498,7 @@ const apis = [
'../Libraries/Components/Clipboard/Clipboard.js',
'../Libraries/Components/DatePickerAndroid/DatePickerAndroid.android.js',
'../Libraries/Utilities/Dimensions.js',
'../Libraries/Geolocation/Geolocation.js',
'../Libraries/Components/Intent/IntentAndroid.android.js',
'../Libraries/Interaction/InteractionManager.js',
'../Libraries/LayoutAnimation/LayoutAnimation.js',
@@ -529,14 +529,9 @@ const stylesForEmbed = [
'../Libraries/Image/ImageStylePropTypes.js',
];

const polyfills = [
'../Libraries/Geolocation/Geolocation.js',
];

const all = components
.concat(apis)
.concat(stylesWithPermalink)
.concat(polyfills);
.concat(stylesWithPermalink);

const styleDocs = stylesForEmbed.reduce(function(docs, filepath) {
docs[path.basename(filepath).replace(path.extname(filepath), '')] =
@@ -560,9 +555,6 @@ module.exports = function() {
apis.map((filepath) => {
return renderAPI(filepath, 'api');
}),
stylesWithPermalink.map(renderStyle),
polyfills.map((filepath) => {
return renderAPI(filepath, 'Polyfill');
})
stylesWithPermalink.map(renderStyle)
);
};