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

Proposal for new doc menu structure #1405

Merged
merged 5 commits into from Apr 5, 2019

Conversation

Projects
None yet
2 participants
@kvz
Copy link
Member

commented Apr 3, 2019

Can be tried live on https://5ca5233bfd8bcc00085152a8--uppy.netlify.com/docs/ (wow @goto-bus-stop this is neat!)

I also changed how it works a bit. Pages now define a category, and the order is within that category. So individual pages can be moved up or down with order, and categories themselves can be moved up or down by changing the order in this array at the top of sidebar.ejs:

var categories = [
  { category: 'Docs', path: 'docs/', link: true, hidden: true },
  { category: 'Plugins', path: 'docs/plugins/', link: true },
  { category: 'UI Elements', path: 'docs/dashboard/', link: false },
  { category: 'Sources', path: 'docs/drag-drop/', link: false },
  { category: 'Destinations', path: 'docs/tus/', link: false },
  { category: 'File Processing', path: 'docs/robodog/', link: true },
  { category: 'Miscellaneous', path: 'docs/form/', link: false },
  { category: 'React', path: 'docs/react/', link: true },
]

When you hover over the (c) it says: "Requires Companion", introduced via menu_prefix: "<span title='Requires Companion'>ⓒ </span>" in the frontmatter. Not sure yet if that's the best way to visually distinct them. I also added support for setting menu_prefix: "<hr>" so we can try different styling options.

In case it's hard to tell, I tried to highlight the most important changes here:

Screenshot 2019-04-03 at 23 05 51

kvz added some commits Apr 3, 2019

@arturi

This comment has been minimized.

Copy link
Collaborator

commented Apr 4, 2019

I like the new structure! 👍

  1. The Examples page menu broke:

Screen Shot 2019-04-04 at 11 38 10

  1. I wonder if Dashboard is also a Source, since Drag & Drop is. You can use Dashboard without other plugins.
@kvz

This comment has been minimized.

Copy link
Member Author

commented Apr 4, 2019

kvz added some commits Apr 4, 2019

@kvz

This comment has been minimized.

Copy link
Member Author

commented Apr 4, 2019

  1. Ok I’ll look into that

Just pushed a fix for this, thanks for catching! Made it so that examples support menu categories in the same way, so this is an option now:

Screenshot 2019-04-04 at 13 08 29

Not sure if we want that, just saying it's easy to do. To revert just set category: 'Examples' to the markdown & transloadit example, and remove File Processing as a category from sidebar.ejs

@kvz kvz merged commit bab4b9d into master Apr 5, 2019

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details

@kvz kvz deleted the new-docs-menu branch Apr 5, 2019

@kvz

This comment has been minimized.

Copy link
Member Author

commented Apr 5, 2019

Discussed in Slack that this is ok to merge, we can finetune in master later

@arturi

This comment has been minimized.

Copy link
Collaborator

commented Apr 9, 2019

I even wonder if we should make .use(DragDrop) mandatory

I think it might be too big of change now, DragDrop plugin is a separate beast and the way Dashboard supports plugins is different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.