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

Fix #778 Enhancement/switch between examples #863

Merged

Conversation

alielkhateeb
Copy link
Contributor

Fix #778 [Enhancement] Switch between examples.

  • Added an entry point with a list of examples to choose from
  • Hash Router to all the existing examples

You can use examples.js to easily add more examples in the future, just add the label and the component to render.

…th router)

Added router cards and started adding routes.
exported all examples components
Listed the number of examples
@coveralls
Copy link

coveralls commented Aug 24, 2019

Coverage Status

Coverage remained the same at 76.217% when pulling c2f4ee3 on alielkhateeb:enhancement/switch-between-examples into 3099dec on gregnb:master.

@gabrielliwerant gabrielliwerant self-requested a review August 24, 2019 18:50
@gabrielliwerant gabrielliwerant added the needs review Useful to mark PRs for what's up next to review label Aug 24, 2019
@patorjk
Copy link
Collaborator

patorjk commented Aug 26, 2019

Just took a peak at this, I think this is a really good idea. If @gabrielliwerant decides to move forward with this, I'd recommend adding a link to the repo's code sandbox (https://codesandbox.io/s/github/gregnb/mui-datatables) in the Demo section of README.md.

@gabrielliwerant
Copy link
Collaborator

It's on my radar for sure, just been working on a bunch of other things with the table! FYI, all the PRs marked "needs review" are on my radar, like a todo list, in case you're wondering if I've forgotten about something.

@alielkhateeb
Copy link
Contributor Author

And I also think we could improve the documentation by adding live demo links to each option we have an example for, it would be much easier for the users to have a look on what this option actually does visually.

For example, in the description of customFilterListRender, we could have Demo along with the included Example

Just a thought.

@gabrielliwerant
Copy link
Collaborator

@alielkhateeb Live demo links would be great, but probably make more sense in a full documentation website, like what material ui has. As the library matures we could definitely use something like that, but I think we should hold off for now. I know the repo owner attempted this a while ago, so he may have thoughts on it first.

Copy link
Collaborator

@gabrielliwerant gabrielliwerant left a comment

Choose a reason for hiding this comment

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

This is great! Vast improvement over the previous setup. This sets us up to iterate into a full-fledged documentation website quite nicely.

@gabrielliwerant gabrielliwerant added enhancement lgtm needs work and removed needs review Useful to mark PRs for what's up next to review lgtm labels Aug 29, 2019
@gabrielliwerant
Copy link
Collaborator

@alielkhateeb Looks like some of the other PRs were touching the webpack.config.js to switch examples, so that created a conflict for you. After your changes are merged, we'll never need to deal with that again!

Copy link
Collaborator

@gabrielliwerant gabrielliwerant left a comment

Choose a reason for hiding this comment

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

Quick conflict resolution needed in webpack,config.js.

@alielkhateeb
Copy link
Contributor Author

@gabrielliwerant Merged.
Yup, no one will have to push this file again 🍾

Copy link
Collaborator

@gabrielliwerant gabrielliwerant left a comment

Choose a reason for hiding this comment

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

Thanks for updating this! I'm excited to get it into the project.

@gabrielliwerant gabrielliwerant merged commit 0b74311 into gregnb:master Sep 12, 2019
lalong13 pushed a commit to lalong13/mui-datatables that referenced this pull request Jan 15, 2020
* [Enhancement] working on issue gregnb#778 (Switch between examples with router)
Added router cards and started adding routes.

* Added all the examples to examples.js
exported all examples components

* Fixed some exports
Listed the number of examples

* Added noslash type to remove the extra slash after the # from the URL (gregnb#778)
@alielkhateeb alielkhateeb deleted the enhancement/switch-between-examples branch April 16, 2020 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

how to switch between demo of examples without restarting npm
4 participants