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: add missing twbs/examples and change sorting #38407

Merged
merged 8 commits into from
Apr 5, 2023

Conversation

julien-deramond
Copy link
Member

@julien-deramond julien-deramond commented Apr 4, 2023

Description

This PR adds missing twbs/examples in our /examples page.

In order to do that, because of the src/pages/index.tsx main file, I've modified the /examples/_index.md file to directly set the index path from site/data/examples.yml file.

It also adds some callouts:

  • First one is on the top of the color modes page, to let users know that we have a dedicated example for that.
  • Second one is within the list of JS frameworks in JavaScript documentation page, to let users know that we have a dedicated example for React and React Bootstrap.

Motivation & Context

Let the users know that we have a lot of examples.

Type of changes

  • Enhancement (non-breaking change which adds functionality)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • I have updated the documentation accordingly
  • (N/A) I have added tests to cover my changes
  • All new and existing tests passed

Live previews

Related issues

Closes #38370

@julien-deramond julien-deramond marked this pull request as ready for review April 4, 2023 16:33
indexPath: src/pages/index.tsx
- name: Bootstrap with Vue
description: "Import and bundle Bootstrap's source Sass and JavaScript with Vue and Vite."
url: /examples/tree/main/vue
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should sort these a little different? I feel the current sorting is a little weird, but I don't know if sorting by name in the template would make sense. Maybe a manual sorting would be better?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I didn't understand the original order when I added the new examples so I've put them in the end. I agree that it can be improved but IDK know how exactly. If we don't find any idea or logic to sort them, maybe the right thing to do is to do it alphabetically.
If you have any ideas, you can commit them directly. I'll try to think about it too.

Copy link
Member

Choose a reason for hiding this comment

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

Have a look now :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Better IMO. Maybe we can also remove the "Bootstrap with " prefixes. Not sure there are useful for readability.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I was about to drop them

Copy link
Member Author

@julien-deramond julien-deramond Apr 5, 2023

Choose a reason for hiding this comment

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

Oh yeah or putting it everywhere like you did. One or the other no problem

Copy link
Member

Choose a reason for hiding this comment

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

I kept the same sorting we have in https://github.com/twbs/examples#readme

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea. LGTM 👌

@XhmikosR XhmikosR changed the title Docs: add missing twbs/examples Docs: add missing twbs/examples and change sorting Apr 5, 2023
@XhmikosR XhmikosR changed the title Docs: add missing twbs/examples and change sorting Docs: add missing twbs/examples and change sorting Apr 5, 2023
@XhmikosR XhmikosR merged commit d0cc42c into main Apr 5, 2023
@XhmikosR XhmikosR deleted the main-jd-add-missing-examples-in-docs branch April 5, 2023 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add the new react example in docs
2 participants