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

[docs] Sticky Navigation #314

Closed

Conversation

adekunleoduye
Copy link
Member

@adekunleoduye adekunleoduye commented Mar 28, 2019

Summary:
Documentation nav becomes sticky when user scrolls down the page.

Screenshot:
15126189ffbfee2d47a0ce7b259d557e

To dos:

  • Removes inline styles from sass.js and put them into a sass files
  • abstract function out of sass.js into documentation.js
  • Give background color to nav
  • Add shim to content when nav is sticky

Closes #268

);
}),
(a.fn.smoothScroll.defaults = c);
});

Choose a reason for hiding this comment

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

Expected an assignment or function call and instead saw an expression.

.replace(/\/$/, "")
);
}),
(a.fn.smoothScroll.defaults = c);

Choose a reason for hiding this comment

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

Expected an assignment or function call and instead saw an expression.

}
}),
e.step && (q.step = e.step),
h.length ? h.stop().animate(p, q) : g(e);

Choose a reason for hiding this comment

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

Expected an assignment or function call and instead saw an expression.

: (h = a("html, body").firstScrollable(e.direction)),
e.beforeScroll.call(h, e),
(l = k.px
? k

Choose a reason for hiding this comment

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

Misleading line break before '?'; readers may interpret this as an expression boundary.

d && (k = f(d))),
(o = "left" === e.direction ? "scrollLeft" : o),
e.scrollElement
? ((h = e.scrollElement),

Choose a reason for hiding this comment

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

Misleading line break before '?'; readers may interpret this as an expression boundary.

) {
for (; l && j < h.length; ) f.is(c(h[j++])) && (l = !1);
for (; l && k < i.length; ) f.closest(i[k++]).length && (l = !1);
} else l = !1;

Choose a reason for hiding this comment

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

Expected '{' and instead saw 'l'.

(r && !a(r).length && (l = !1), g.scrollTarget || (p && q && r))
) {
for (; l && j < h.length; ) f.is(c(h[j++])) && (l = !1);
for (; l && k < i.length; ) f.closest(i[k++]).length && (l = !1);

Choose a reason for hiding this comment

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

Expected '{' and instead saw 'f'.
Expected an assignment or function call and instead saw an expression.

if (
(r && !a(r).length && (l = !1), g.scrollTarget || (p && q && r))
) {
for (; l && j < h.length; ) f.is(c(h[j++])) && (l = !1);

Choose a reason for hiding this comment

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

Expected '{' and instead saw 'f'.
Expected an assignment or function call and instead saw an expression.

smoothScroll: function(b, c) {
if ("options" === (b = b || {}))
return c
? this.each(function() {

Choose a reason for hiding this comment

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

Misleading line break before '?'; readers may interpret this as an expression boundary.

},
smoothScroll: function(b, c) {
if ("options" === (b = b || {}))
return c

Choose a reason for hiding this comment

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

Expected '{' and instead saw 'return'.

@jina
Copy link
Member

jina commented Mar 28, 2019

It looks like the content jumps to the left, assuming because the nav is pulled out of the flow. Perhaps a shim of some sort in its place so that the content doesn't shift over?

@adekunleoduye
Copy link
Member Author

@jina That sounds good to me. I'll added that to the todo list and update that PR.

@nex3
Copy link
Contributor

nex3 commented Mar 28, 2019

When I load this up and go to /documentation, when I scroll down far enough it just jumps back to the top of the page in a very jarring way.

When I go to /documentation/syntax/structure and scroll down, the page nav starts overlapping with the global nav:

nav

Are there plans for making the top-level nav sections expandable? What about for making page-level navs sticky?

I think it may be cleaner to just have the scrollbar present all the time, rather than flashing into existence once the user scrolls down far enough.

@nex3 nex3 force-pushed the wip.reference branch 3 times, most recently from ea9b6ed to b1ee5c8 Compare April 23, 2019 16:47
Gemfile Outdated
@@ -1,5 +1,5 @@
source "https://rubygems.org"
ruby "2.5.3"
ruby "2.5.1"
Copy link

Choose a reason for hiding this comment

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

Is there a good reason for why the ruby "2.5.3" version was replaced with an older ruby "2.5.1" version?

Copy link
Member Author

Choose a reason for hiding this comment

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

No specific reason, I was having trouble installing ruby "2.5.3"

this === document.documentElement &&
"smooth" === a(this).css("scrollBehavior") &&
(c = [this]),
c.length || "BODY" !== this.nodeName || (c = [this]);

Choose a reason for hiding this comment

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

Expected an assignment or function call and instead saw an expression.

return !document.scrollingElement ||
(this !== document.documentElement && this !== document.body)
? void (b[e]() > 0
? c.push(this)

Choose a reason for hiding this comment

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

Misleading line break before '?'; readers may interpret this as an expression boundary.

if (this !== document && this !== window)
return !document.scrollingElement ||
(this !== document.documentElement && this !== document.body)
? void (b[e]() > 0

Choose a reason for hiding this comment

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

Misleading line break before '?'; readers may interpret this as an expression boundary.

this.each(function() {
var b = a(this);
if (this !== document && this !== window)
return !document.scrollingElement ||

Choose a reason for hiding this comment

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

Expected '{' and instead saw 'return'.

? define(["jquery"], a)
: a(
"object" == typeof module && module.exports ? require("jquery") : jQuery
);

Choose a reason for hiding this comment

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

Expected an assignment or function call and instead saw an expression.

"function" == typeof define && define.amd
? define(["jquery"], a)
: a(
"object" == typeof module && module.exports ? require("jquery") : jQuery

Choose a reason for hiding this comment

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

'require' is not defined.

@@ -5,22 +5,209 @@
* Licensed MIT
*/

!(function(a) {
"function" == typeof define && define.amd
? define(["jquery"], a)

Choose a reason for hiding this comment

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

'define' is not defined.
Misleading line break before '?'; readers may interpret this as an expression boundary.

@@ -5,22 +5,209 @@
* Licensed MIT
*/

!(function(a) {
"function" == typeof define && define.amd

Choose a reason for hiding this comment

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

'define' is not defined.

@adekunleoduye
Copy link
Member Author

Since this PR is stale, I'm going to close it and open a new one.

@adekunleoduye adekunleoduye deleted the feat/stickyDocNav branch September 30, 2019 11:18
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.

None yet

5 participants