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

[wip][docs] update docs site design #1152

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

gabrielcsapo
Copy link
Contributor

@gabrielcsapo gabrielcsapo commented Jun 3, 2020

Motivation

fixes #1149 which focuses on revamping the site design to look like https://getmdl.io/components/index.html.

Comparing two examples side by side we can see that having the example and code condensed together makes things easier to understand:

output

We can fit more examples in line to allow developers to play around with the variations without having to scroll the entire length of the page to see all iterations.

Todo

  • Update all examples to have a layout like
examples rendered
[code snippet rendered underneath]
  • Convert all sample code to octane
  • update landing pages
  • For some reason clicking on the TOC now redirects to index. This is probably related to the anchor tag pointing to a url with #, which ember interprets as a route since it is using locationType 'hash' for some reason?
  • The toast example doesn't open any toast.
  • I feel like the text pages should have a max-width and be centered. Otherwise they take all the page and be aligned left (especially weird in theme and addons pages, without a sidenav)
  • we need to have some kind of logo, even if really simple.

@gabrielcsapo gabrielcsapo changed the title [docs] update docs site design [wip][docs] update docs site design Jun 3, 2020
@miguelcobain
Copy link
Collaborator

miguelcobain commented Jun 10, 2020

@gabrielcsapo this looks great!
Perhaps in the top nav we could use tabs instead of buttons?
I also think the "logo" could fit in there, either on the left side of the tabs or above them in its own row (this would take more vertical space, though).
This is identical to what https://getmdl.io/ has.

@gabrielcsapo
Copy link
Contributor Author

@miguelcobain glad to hear!

Right now we are using LinkTo in the top nav instead of buttons. I was trying to use tabs but the problem is that they do not deal with subrouting correctly. So if you have tab that routes to component and then you are on component.autocomplete it doesn't select it as active.

I was trying to work with the logo but it doesn't seem like it fits as the vertical space is too much and the logo itself I tried to convert from image + text to just an image and it still feels out of place.

@gabrielcsapo
Copy link
Contributor Author

@miguelcobain I updated the progress picture for one of the component pages!

@Subtletree

This comment has been minimized.

@miguelcobain
Copy link
Collaborator

miguelcobain commented Jun 11, 2020

Right now we are using LinkTo in the top nav instead of buttons. I was trying to use tabs but the problem is that they do not deal with subrouting correctly. So if you have tab that routes to component and then you are on component.autocomplete it doesn't select it as active.

There is a way to have an is-active helper that you can use like @isSelected={{is-active "components"}} on the paper tab. This helper will return true whenever "components" or any child route is active.

I used to have my own helper, but I just found ember-router-helpers: https://github.com/rwjblue/ember-router-helpers

Regarding the logo, I guess we need to find an alternative.

@Subtletree That wouldn't work because we want the tab to be active for all components, not just a specific one.

@Subtletree
Copy link
Collaborator

Subtletree commented Jun 11, 2020

@Subtletree That wouldn't work because we want the tab to be active for all components, not just a specific one.

Good point! In that case another option would be a helper selected=(tab-route currentRouteName) that does return currentRouteName.split('.')[0].

Since all the tabs are top level routes.

@gabrielcsapo
Copy link
Contributor Author

@miguelcobain I updated, would you be able to review?

@gabrielcsapo
Copy link
Contributor Author

@miguelcobain 👋 would you let me know if anything needs to be changed?

@miguelcobain
Copy link
Collaborator

miguelcobain commented Jul 15, 2020

@gabrielcsapo I updated the PR so that it uses paper-tabs for the main nav.

I still feel that there are some things off.

  • For some reason clicking on the TOC now redirects to index. This is probably related to the anchor tag pointing to a url with #, which ember interprets as a route since it is using locationType 'hash' for some reason?

  • The toast example doesn't open any toast.

  • I feel like the text pages should have a max-width and be centered. Otherwise they take all the page and be aligned left (especially weird in theme and addons pages, without a sidenav)

  • we need to have some kind of logo, even if really simple.

I'll try to work more on this.

@gabrielcsapo
Copy link
Contributor Author

@miguelcobain just getting back to this as work is less busy. will fix the issues you described, will ping you in discord about the logo!

@gabrielcsapo
Copy link
Contributor Author

@miguelcobain update the text pages so that they are centered and not oddly left aligned.

Screen Shot 2020-11-06 at 8 48 46 PM

Screen Shot 2020-11-06 at 8 48 40 PM

@gabrielcsapo
Copy link
Contributor Author

I have fixed all outstanding issues except for the logo. @miguelcobain

@gabrielcsapo
Copy link
Contributor Author

@miguelcobain any updates on how we should fix the logo suggestion?

@Subtletree Subtletree mentioned this pull request Mar 3, 2022
41 tasks
@gabrielcsapo
Copy link
Contributor Author

@miguelcobain if I rebase this and get it running would you be interested in merging it?

@mansona
Copy link
Collaborator

mansona commented Jul 14, 2022

Hey @gabrielcsapo 👋 I'm mostly taking over maintenance of this project at the moment, I haven't had a chance to look at all of the open Issues and PRs yet but I would love to discuss this in more detail with you if you have the time? Are you on the Ember Community Discord? I'm real_ate#4200 on there if you want to reach out and we might arrange a call?

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.

[docs] design thoughts
4 participants