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

Update navbar usage and documentation #790

Merged
merged 8 commits into from
Mar 31, 2019

Conversation

Chng-Zhi-Xuan
Copy link
Contributor

@Chng-Zhi-Xuan Chng-Zhi-Xuan commented Mar 25, 2019

What is the purpose of this pull request? (put "X" next to an item, remove the rest)

• [x] Documentation update
• [x] Enhancement to an existing feature

Part of #733

Note:
This PR is branched from #733. Thus the commits are shared with it.
First unique commit is titled Asset: Update vue-strap.min.js.

What changes did you make? (Give an overview)

  • Added updated vue-strap.min.js from Remove position fixed classes from Navbar vue-strap#101
  • Updated navBars.mbdf to reflect new behaviour of navbars
  • Updated spacer-top class
  • Refactored usage of header.md within documentation and test_site to a header file
  • Added header content test within test_site

Is there anything you'd like reviewers to focus on?

  • Commit messages
  • Documentation changes

Testing instructions:

  • Browse documentation using Netlify Preview

marvinchin
marvinchin previously approved these changes Mar 25, 2019
Copy link
Contributor

@marvinchin marvinchin left a comment

Choose a reason for hiding this comment

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

Looks good, just a couple of nits 🍰

This class can be removed once the component's position type is changed.
*/
padding-top: 70px;
/* This class is to ensure adequate spacing of contents from the top of the page */
Copy link
Contributor

Choose a reason for hiding this comment

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

Just wondering - should this comment be placed outside the class definition (even though the comment was previously inside the class definition)? 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For this section, how I formatted it was

/**
  * Main section description
  */

/* sub section one */

/* sub section two */

.some-class {
  /* class description */
}

My intention was to separate sub section title comments from class descriptions

@@ -2,11 +2,17 @@

**Navbar allows visitors of your website to navigate through pages easily.**

<box type="warning">
<markdown>
Note: **Navbars** should be placed within a [header file]({{ baseUrl }}/userguide/tweakingthepagestructure.html#headers) to ensure correct positioning at the top of your page.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we change "to ensure correct positioning" -> "to ensure that they are correctly positioned"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"... to ensure that they are correctly positioned above page navigation and site navigation menus." ?

Added more explicit interaction description.

Copy link
Contributor

Choose a reason for hiding this comment

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

How about:

"... to ensure that they are correctly positioned at the top of the page, above the page navigation and site navigation menus."

@marvinchin marvinchin self-requested a review March 25, 2019 17:07
@marvinchin marvinchin dismissed their stale review March 25, 2019 17:07

Wanted to clicked comment but hit approve instead :(

Copy link
Contributor

@luyangkenneth luyangkenneth left a comment

Choose a reason for hiding this comment

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

Seems like the navbar is no longer fixed to the top of the page. Is this intentional?

i.e. The more I scroll, the less of the navbar I see
Screenshot 2019-03-28 at 6 04 45 PM

@luyangkenneth
Copy link
Contributor

luyangkenneth commented Mar 28, 2019

Also, I'm not sure which specific PR introduced this change, but the "User Guide" heading in the site nav is indented when it shouldn't be.

@yamgent
Copy link
Member

yamgent commented Mar 28, 2019

As spoken, need to rebase this PR to get rid of the commits that originated from #733.

@yamgent
Copy link
Member

yamgent commented Mar 28, 2019

Seems like the navbar is no longer fixed to the top of the page. Is this intentional?

@luyangkenneth As discussed with Prof, yes this is intentional, it follows the style of other websites such as Jekyll's home page.

@damithc
Copy link
Contributor

damithc commented Mar 29, 2019

@luyangkenneth As discussed with Prof, yes this is intentional, it follows the style of other websites such as Jekyll's home page.

As I understood, there are technical difficulties in making the navbar fixed after the recent changes to add support for page headers. Some (but not all) other similar sites such as Jekyll seem to have non-fixed nav bars too. So, I don't mind dropping the fixed navbar until we can bring back support for fixed navbars.

@Chng-Zhi-Xuan
Copy link
Contributor Author

Chng-Zhi-Xuan commented Mar 29, 2019

Update

  • Rebase to latest master
  • Made minor documentation amendments, following review comments.

Discussion

Adopting the new holy grail layout require us to forgo position:fixed items. This is as we wanted to avoid using magic numbers to align the sticky side navigation menus if there was a position:fixed top navigation bar.

It also solves the issue of using anchor links and having a position:fixed top navbar block the heading.

Copy link
Member

@yamgent yamgent left a comment

Choose a reason for hiding this comment

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

Also there's a merge conflict again.

@@ -0,0 +1,11 @@
<header>
<navbar placement="top" type="inverse">
Copy link
Member

Choose a reason for hiding this comment

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

placement="top" is redundant here.

The navbar component within the vue-strap repository has
been updated, thus we need to import the newly built
file into MarkBind.
Since header.md uses the navbar component, it is not
positioned correctly when used inline.

Let's shift header.md into the headers folder so that
it can be specified in the frontmatter for the pages
that require it.
The header.md contents will not be positioned correctly
unless it is specified as a header file.

Let's change usage of navbars within each page from
inline to specifying it within frontmatter.
Since the behaviour of the navbar component has changed,
let's update the documentation for it.
The workaround for the spacer-top class is not required
as navbars do not have position:fixed with the latest changes.

However, the contents of the menus are too close to the top of
the page after "sticking" to the top. Thus the padding has been
changed to 1rem to follow Bootstrap's navbar spacing conventions.
This is to test other content, aside from the navbar,
whether they will be placed correctly within the page.
@Chng-Zhi-Xuan
Copy link
Contributor Author

Update

  • Rebase to latest master
  • Removed placement="top" from header.md in test_site

@yamgent yamgent added this to the v1.22.1 milestone Mar 30, 2019
@yamgent yamgent merged commit ef167aa into MarkBind:master Mar 31, 2019
@Chng-Zhi-Xuan Chng-Zhi-Xuan deleted the 733-navbar-position branch May 21, 2019 06:41
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.

5 participants