-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: menu change current to lb3 #2327
Conversation
Changed |
b6a8d9c
to
22f976f
Compare
@bschrammIBM I amended the commit message for you so that CI can pass the check. See https://github.com/strongloop/loopback-next/blob/master/docs/site/DEVELOPING.md#commit-message-guidelines for future references. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for the change described at the top.
I am confused about what I see in the patch. What is the purpose of Example1.md
file and how is it different from Examples.md
? Similarly for Contribution1.md
and Contributions.md
.
Even more importantly: I am afraid you are making the changes in the wrong place. Documentation for LoopBack version 4 is maintained in loopback-next monorepo.
@bajtos Please review the current edits in my branch change_current_lb3. |
f137206
to
4e0cb2c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please review the current edits in my branch change_current_lb3.
Done, see my comments below. The first one is important to address, the rest are points to discuss.
I am working in the following local repo: /Users/bschramm/loopback-next/docs/site so I think that is correct.
Yes, you are working correctly. It was me who was confused, I apologize again.
docs/site/Example1.md
Outdated
title: Examples | ||
keywords: LoopBack 4.0 | ||
sidebar: lb4_sidebar | ||
permalink: /doc/en/lb4/Examples.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am confused about the purpose of this file. It has filename Example1.md
, uses the same permalink /doc/en/lb4/Examples.html
as the file Example.md
below, and described rpc-server
example only.
Maybe this some sort of a back-up or earlier draft that should have been deleted before opening the pull request?
Anyhow, can we remove this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I did remove it and somehow it was added back in after my many conflict resolutions! It was an interim file.
docs/site/Examples-and-tutorials.md
Outdated
|
||
- **[todo](todo-tutorial.md)**: Tutorial on building a simple application with | ||
LoopBack 4 key concepts using bottom-up approach. | ||
|
||
- **[todo-list](todo-list-tutorial.md)**: Tutorial on introducing related models | ||
and building their API from the Todo tutorial | ||
|
||
- **[soap-calculator](soap-calculator-tutorial.md)**: Tutorial on integrating | ||
SOAP web services. | ||
- **[hello-world](https://github.com/strongloop/loopback-next/tree/master/examples/hello-world)**: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are listing all individual tutorials, but then pointing to another page for a list of examples. I would prefer to be more consistent and do the same for tutorials and examples.
In my experience, when the same information is maintained in multiple places (Examples-and-tutorials, Examples, Tutorials), these places eventually get out of sync because people will often make change in one place only and forget about the other places.
I am proposing to trim down Examples-and-tutorials and maintain the list of tutorial inside Tutorials.md
only.
Conceptually:
LoopBack 4 comes with tutorials, which are available here:
- **[Tutorials](Tutorials.md)**
LoopBack 4 also comes with example projects, which are available here:
- **[Example Projects](Examples.md)**
Having said that, this deep structure may be less friendly to our readers, they will have to make one more click to find the example/tutorial they are looking for. Two alternatives to consider:
-
Don't create additional level of nesting. Keep both tutorials & examples in the same sidebar. Use sections in
Examples-and-tutorials
to split the list in multiple parts - tutorials, examples, contributions. -
Leverage
{% include %}
to keep the list of examples/tutorials in a single file, and render this list on multiple pages (Examples-and-tutorials, Examples, Tutorials). Prior art in LB 3.x docs: Remote Methods and rm-options.md. Personally, I find this setup a bit confusing, because it takes me time to figure out where to locate the included file.
Let's discuss!
/cc @dhmlau @strongloop/sq-lb-apex
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to decide how important it is to separate Examples and Tutorials. I like the idea of having one page to link to the 3 sections, rather than separate landing pages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
I don't really mind, at first, whether it is
Examples and tutorials
and having a nestedExamples
andTutorials
. After a second thought, if we'll be showing the step as the nested item under tutorials, it might be good that we haveExamples
andTutorials
as the top level element. -
For tutorials (if those really fit, see my comment below), i think it makes sense to be consistent to have a similar format as the todo tutorial.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to see:
- examples and tutorials list on separate pages
- tutorials are kept in docs and example steps are kept in each example repository
The menu structure would be:
- Tutorials
- Todo: a page with todo tutorials
- TodoList: a page with todo list tutorials
- ...(more tutorials)
- Examples: We only need one page to list all available examples without sub menus. And the example repository keeps all the details in its
.md
file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HI @jannyHou the description in your comment is what the current design is for this PR (except for the Contibutions section which you don't mention, but what you described for Tuts and Ex is what is contained in current PR)
- examples and tutorials list on separate pages
- tutorials are kept in docs and example steps are kept in each example repository
The menu structure would be:
-
Tutorials
- Todo: a page with todo tutorials
- TodoList: a page with todo list tutorials
- ...(more tutorials)
-
Examples: We only need one page to list all available examples without sub menus. And the example repository keeps all the details in its
.md
file
docs/site/Tutorials.md
Outdated
LoopBack 4 comes with the following tutorials: | ||
|
||
- **[hello-world](https://github.com/strongloop/loopback-next/tree/master/examples/hello-world)**: | ||
Tutorial on setting up a simple hello-world application using LoopBack 4. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure that hello-world is a tutorial? AFAICT, it does not come with any actual tutorial guiding readers through the steps needed to build such application. Should we perhaps move hello-world to Examples section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it was an example also, but the title said tutorial. I vote yes to move it to Examples.
docs/site/Tutorials.md
Outdated
- **[todo-list](todo-list-tutorial.md)**: Tutorial on introducing related models | ||
and building their API from the Todo tutorial | ||
|
||
- **[log-extension](https://github.com/strongloop/loopback-next/tree/master/examples/log-extension)**: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we extract the tutorial part from log-extension's README into a proper tutorial page in our docs?
This is what we have in other tutorial projects, this snippet is cross-posted from examples/todo/README.md
:
## Tutorial
To follow this tutorial, begin with the
[Create your app scaffolding](http://loopback.io/doc/en/lb4/todo-tutorial-scaffolding.html)
section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another point to discuss with @dhmlau @strongloop/sq-lb-apex
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to be consistent with the todo tutorial. However, I'm looking at the README for the log-extension
from the above link, it looks more like an example to me? It has some description on the changes, but not really step by step showing how to create an extension.
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading log-extension
again, @bajtos, you're right that it has some instructions in how to build it, thus fits as tutorial. We can extract the steps to sidebars in this PR or a follow up. I'm good either way.
@bschrammIBM , thanks for taking up on this! I've added my comment. As @bajtos mentioned, could you please fix the PR so that unwanted files are not here? It will help with the review. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @bschrammIBM Mostly LGTM, I left some comments for the discussions.
(And remember to delete the Example1.md file :-p)
docs/site/Examples-and-tutorials.md
Outdated
|
||
Projects that were contributed by the LoopBack community are available here: | ||
|
||
- **[Contributions from the LoopBack Community](Contributions.md)** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we have a contribution page https://loopback.io/doc/en/contrib/index.html, while I also noticed that https://loopback.io/doc/en/lb4/ doesn't have an explicit menu that links to it, at least on the top level menu.
I am not sure is it a good idea to add it to this page...I suggest if we want to add an entry for contributions doc, make it a top level menu that links to https://loopback.io/doc/en/contrib/index.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the goal was to request Tutorials and Examples from the community for the Contributions page. But we can update the https://loopback.io/doc/en/contrib/index.html page to include loopback-next, because for right now it only applies to loopback 3. Ans then link to it. But I thought we wanted a place specifically for Tuts and Ex.
For posterity, @bschrammIBM and I had a discussion on how to move this PR forward:
Tutorial (root level) - this page contains the list of tutorials listed in the child elements.
@bschrammIBM , please correct me if i miss anything. Thanks. |
4d24ea2
to
50d005f
Compare
docs: ex and tut menu structure docs: fix sdebar docs: menu change current to lb3
docs: ex and tut menu structure docs: fix sdebar
e29ef04
to
9fb3333
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bschrammIBM, please see my latest comment. Thanks.
docs/site/Contributions.md
Outdated
@@ -0,0 +1,10 @@ | |||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we've discussed this will not be included because we don't have anything to put it there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was supposed to be removed. Must have been a git error again. I will remove it (again)!
docs/site/Tutorials.md
Outdated
- **[todo-list](todo-list-tutorial.md)**: Tutorial on introducing related models | ||
and building their API from the Todo tutorial | ||
|
||
- **[log-extension](https://github.com/strongloop/loopback-next/tree/master/examples/log-extension)**: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading log-extension
again, @bajtos, you're right that it has some instructions in how to build it, thus fits as tutorial. We can extract the steps to sidebars in this PR or a follow up. I'm good either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
once this is addressed, LGTM. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bschrammIBM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Checklist
npm test
passes on your machinepackages/cli
were updatedexamples/*
were updated