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

Add precompiled v2.1.0 stable docs version #552

Merged
merged 8 commits into from
Nov 15, 2017
Merged

Conversation

ThomDietrich
Copy link
Member

@ThomDietrich ThomDietrich commented Nov 5, 2017

Following the principle: Better than nothing.
This is a first approach in solving #520 here and now.
The PR includes a precompiled version of tag 2.1.0 as the new subfolder "2.1.0".
The PR also includes buttons to switch the version shown.

Modifications applied to 2.1.0 (will need to be addressed in the form of version-branch commits later):

  • _config.yml base change
  • _includes/base.html base change
  • usermenu change for generated addons urls

Known limitation: Generation of the button link is derived from the current URL. If the location of an older article was different or the article didn't exist yet, a 404 error will be shown (e.g. https://docs.openhab.org/2.1.0/addons/bindings/some-brand-new-binding/readme.html).

I'm not striving for perfection with the PR. We should still discuss better options for the long run. See #520

grafik

grafik

Thomas Dietrich added 2 commits November 5, 2017 16:22
Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de>
- _config.yml base change
- _includes/base.html base change
- usermenu change for generated addons urls

Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de>
@kaikreuzer
Copy link
Member

Good start!
A few (early, but late at night ;-) ) comments:

  • We should probably have some direct links to the different available versions on the main entry page of the docs website (over time, there will be more than latest release + snapshot).
  • The "version button" imho takes too much precious space. I would prefer a place where it is not on the content pane, but rather in the header or the side menu (I assume it is more difficult to integrate it there, though). If we have links on the main page, I am actually not sure whether we need to support switching between versions on the sub-pages directly. Maybe we could add a toast
    that only briefly mentions the version to the user and then silently disappears again?
  • I assume we only address the user guide, but not the tutorials or the developer guide (although in theory, they might be subject to versioning as well). Is this our common understanding?

@ThomDietrich
Copy link
Member Author

ThomDietrich commented Nov 6, 2017

Hey Kai,
as I said, this is a first PR to get a 2.1.0 stable version of the documentation into place. Would you be okay to merge now and add improvements later?

Regarding your comments:

  • Yes, next PR
  • Moving it somewhere else would actually be quite easy. However as soon as I had placed it in the top menu, we would once again have issues with the mobile view or similar quirks of the page. I could certainly look into a better fit but (1) that can be part of a later PR and (2) I'd rather see effort spent on the new webdesign instead of wasted time now...
  • These are details we would still need to discuss. The current implementation includes the whole 2.1.0 content but only shows the switching button for articles of the User Manual.

@kaikreuzer
Copy link
Member

Would you be okay to merge now and add improvements later?

Yes, but my main concern is that the button is simply huge (also compared to the menus and other parts) and thus adds a lot of white space that is wasted on small screens.
If you could reduce it to 50% of its size, I could live with it until a website relaunch - so this is the only improvement I'd ask you for before merging, ok?

@BClark09
Copy link
Member

BClark09 commented Nov 8, 2017

Apologies for my delay in reply. It's been a busy period, but can see you've been busier 😃 !

I think this is as best as we can do whilst hosting on GitHub, I haven't seen any other way of doing this so the changes look good to me. A couple of non-blocking points:

  • Is there a script that you used to include the new directory? Can it be included in the repo as a site-ignored file?
  • I agree that the versioning button is rather on the big side but can be dealt with easily, perhaps above the left hand column this way, it should look fine on mobile (and still be at the top).
  • Definitely for later, but I think we could make do with removing the versioned "Developers" and (maybe less so) the "Tutorials" sections?

Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de>
Thomas Dietrich added 3 commits November 11, 2017 15:25
Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de>
Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de>
Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de>
Thomas Dietrich added 2 commits November 11, 2017 15:59
Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de>
Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de>
@ThomDietrich
Copy link
Member Author

ThomDietrich commented Nov 11, 2017

Hey guys,
I've invested a few more hours to fine-tune everything.

  • I created a branch called "v2.1.0-patch". This one follows the idea we @BClark09 already discussed. There were more inconsistencies than I thought in the v2.1.0 AND current snapshot revisions I needed to sort out. The new branch consists of all these corrections (see latest v2.1.0-patch commits). The same set of corrections is also included in this PR against gh-pages. This WAS a very cumbersome task but at least now the expected effort for v2.2.0 is small.
  • I've now excluded Tutorials and Developers. Links to these areas are always version-less. One "secret feature" I believe is good to have: If you specifically browse http://docs.openhab.org/v2.1.0/tutorials/beginner/index.html you can still see the older article revisions and the version-specific menu.
  • I've replaced the Switching button with a Dropdown menu, preparing for v2.2.0
  • I did NOT move or resize the button. It's a button following the Materialize Style Guide. The position right next to the article (the part of the page that provides versioning) makes sense. The space used is acceptable, also on mobile. Sounds (and looks) good to me. I did replace the blue color by grey though. The only obvious improvement is to move the button into the article on bigger screens, instead of reserving verticle space for it. This would predictably introduce new overlapping issues I don'T want to deal with right now (the PR is big enough as it is). So far this is my opinion, please remember that we have the chance to add a better position and style with the new page design. I am not going to invest more time on this here and now.
  • As requested by @BClark09 I've added a chapter to the README regarding the versioning design.

The whole PR is tested and ready to merge.

grafik

grafik

@BClark09
Copy link
Member

Nice! I think this is good now. I can't press the approve button just yet because my browser crashes when Im on the review page. 😐

Will try to use my main PC tommorow evening in which I can also test what it looks like serving to a couple of mobile devices.

Copy link
Member

@BClark09 BClark09 left a comment

Choose a reason for hiding this comment

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

Tested and it looks like it works well! 🎉

Copy link
Contributor

@Confectrician Confectrician left a comment

Choose a reason for hiding this comment

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

Tested and works good.

Can we merge or do you want @kaikreuzer to approve that too @ThomDietrich ?

@kaikreuzer
Copy link
Member

Let's merge then - many thanks @ThomDietrich!

@kaikreuzer kaikreuzer merged commit 88ee598 into gh-pages Nov 15, 2017
@ThomDietrich ThomDietrich deleted the dirty-versioning branch November 29, 2017 13:48
@Confectrician Confectrician added this to the 2.x.x milestone Nov 18, 2022
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.

4 participants