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

docs: remove redundant docs versioning #4066

Merged
merged 10 commits into from Feb 22, 2023

Conversation

kacperkapusciak
Copy link
Member

@kacperkapusciak kacperkapusciak commented Feb 17, 2023

Summary

This PR contracts all "v2" docs versions (i.e. 2.0.x, 2.1.x, 2.2x, 2.3.x-2.4.x, 2.5.x-2.10.x) into one 2.x version, renames 1.x.x to 1.x and adds 3.x which is now marked as the current version.

In order to keep old-links working (stack overflow responses, discord comments, slack threads) all legacy versions are redirected to their appropriate slots.

For example:

  • /docs/2.1.x/api/cancelAnimation is going to be redirected to /docs/2.x/api/animations/cancelAnimation,
  • /docs/2.0.x/events to /docs/2.x/fundamentals/events and,
  • /docs/1.x.x/nodes/startClock to /docs/1.x/nodes/startClock.

Actions taken

  • Removed all legacy versions besides 1.x.x and renamed it to 1.x
  • Regenerated 2.x version by running yarn docusaurus docs:version 2.x. This created a copy of the most recent docs and sidebar config into versions-2.x folder (and version-2.x-sidebars.json)
  • Labeled next version as 3.x and marked it as the current default docs.
  • Added redirects for all appropriate legacy versions to 2.x and 1.x versions
  • Added XYZ is available since vx.x.x labels to features which weren't added in 2.x version of Reanimated. These features were:
    • useScrollViewOffset (added in v2.11)
    • useAnimatedKeyboard (added in v2.10)
    • useFrameCallback (added in v2.10)
    • useAnimatedSensor (added in v2.5)
    • LayoutAnimations (added in v2.3)
  • Upgraded Docusaurus to the newest (2.3.1) version

Screenshots

Before

image

After

image

An example XYZ is available since vx.x.x label:
image

@kacperkapusciak kacperkapusciak marked this pull request as ready for review February 20, 2023 11:06
## Summary

This PR fixes links to React Native Gesture Handler documentation on
`useAnimatedGestureHandler` hook
@kacperkapusciak kacperkapusciak marked this pull request as draft February 20, 2023 12:37
@kacperkapusciak kacperkapusciak marked this pull request as ready for review February 22, 2023 15:09
Copy link
Member

@piaskowyk piaskowyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done!

@piaskowyk piaskowyk added this pull request to the merge queue Feb 22, 2023
Merged via the queue into main with commit 6afed55 Feb 22, 2023
@piaskowyk piaskowyk deleted the @kacperkapusciak/simplify-docs-versioning branch February 22, 2023 20:16
tomekzaw added a commit that referenced this pull request Feb 23, 2023
<!-- Thanks for submitting a pull request! We appreciate you spending
the time to work on these changes. Please follow the template so that
the reviewers can easily understand what the code changes affect. -->

## Summary

This PR fixes a broken link in the error message in
`reanimated_utils.rb` which no longer works because `next` version was
removed by @kacperkapusciak in #4066.

## Test plan

Check if the URL is valid.
fluiddot pushed a commit to wordpress-mobile/react-native-reanimated that referenced this pull request Jun 5, 2023
## Summary

This PR contracts all "v2" docs versions (i.e. `2.0.x`, `2.1.x`, `2.2x`,
`2.3.x-2.4.x`, `2.5.x-2.10.x`) into one `2.x` version, renames `1.x.x`
to `1.x` and adds `3.x` which is now marked as the current version.

In order to keep old-links working (stack overflow responses, discord
comments, slack threads) all legacy versions are redirected to their
appropriate slots.

For example:
- `/docs/2.1.x/api/cancelAnimation` is going to be redirected to
`/docs/2.x/api/animations/cancelAnimation`,
- `/docs/2.0.x/events` to `/docs/2.x/fundamentals/events` and,
- `/docs/1.x.x/nodes/startClock` to `/docs/1.x/nodes/startClock`.


### Actions taken
- Removed all legacy versions besides `1.x.x` and renamed it to `1.x`
- Regenerated `2.x` version by running `yarn docusaurus docs:version
2.x`. This created a copy of the most recent docs and sidebar config
into `versions-2.x` folder (and `version-2.x-sidebars.json`)
- Labeled `next` version as `3.x` and marked it as the current default
docs.
- Added redirects for all appropriate legacy versions to 2.x and 1.x
versions
- Added `XYZ is available since vx.x.x` labels to features which weren't
added in 2.x version of Reanimated. These features were:
    - `useScrollViewOffset` (added in v2.11)
    - `useAnimatedKeyboard` (added in v2.10)
    - `useFrameCallback` (added in v2.10)
    - `useAnimatedSensor` (added in v2.5)
    - `LayoutAnimations` (added in v2.3)
- Upgraded Docusaurus to the newest (2.3.1) version

## Screenshots

### Before

<img width="221" alt="image"
src="https://user-images.githubusercontent.com/39658211/219692026-35eacf34-e0c1-4955-b47a-c20a4e6c7e11.png">


### After
<img width="237" alt="image"
src="https://user-images.githubusercontent.com/39658211/220660846-61c433e6-cc56-4fc6-bd39-886b01001299.png">


An example `XYZ is available since vx.x.x`  label: 
<img width="725" alt="image"
src="https://user-images.githubusercontent.com/39658211/220083875-98fe01a7-b63d-4157-9709-74fe517e60cf.png">
fluiddot pushed a commit to wordpress-mobile/react-native-reanimated that referenced this pull request Jun 5, 2023
<!-- Thanks for submitting a pull request! We appreciate you spending
the time to work on these changes. Please follow the template so that
the reviewers can easily understand what the code changes affect. -->

## Summary

This PR fixes a broken link in the error message in
`reanimated_utils.rb` which no longer works because `next` version was
removed by @kacperkapusciak in software-mansion#4066.

## Test plan

Check if the URL is valid.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants