Always show Versions menu, though disabled when necessary#338
Conversation
Now we always display the Versions menu but have made it inactive on pages where it doesn't apply Signed-off-by: Nate W <4453979+nate-double-u@users.noreply.github.com>
|
Deploy preview: https://deploy-preview-338--etcd.netlify.app/ |
chalin
left a comment
There was a problem hiding this comment.
Thanks. Let's refactor this so that the dropdown html is always present, but the anchor has the added disabled class when not under /docs.
I'm not sure how we can (if I'm understanding this request correctly). If you mean something like I'm not sure what dropdown html should be built on non versioned pages. |
Yes, almost: move the space inside the if:
Darn. I wasn't expecting useful dropdown entires, but also wasn't expecting it to fail. Ok then, put the |
249fdb0 to
bd6b81b
Compare
The last (force pushed) commit does this -- but I don't like having an empty dropdown as much as having a visually distinct disabled versions selector. |
chalin
left a comment
There was a problem hiding this comment.
I don't like having an empty dropdown as much as having a visually distinct disabled versions selector.
Right, neither do I. We need both. So you can add the conditional inclusion of disabled (the way you had suggested earlier).
OK, added -- on Firefox disabling doesn't allow the dropdown to work, so we don't get an empty one on click. waiting for the build to check other browsers. |
|
wait, i didn't do that quite correctly. |
|
OK, the latest commit gives the |
1acf569 to
6d4bb2d
Compare
|
@nate-double-u - On Friday I was on the fence between accepting your original change and asking for extra rework in the context of this PR or later. I've changed my mind and, for now at least, I prefer the simplicity of your original change -- so I went ahead and stripped the extra commits to leave only the first one. While there is an opportunity to rework this fix to keep things a bit more DRY, that can come later. |
Now we always display the Versions menu but have made it inactive on pages where it doesn't apply Signed-off-by: Nate W <4453979+nate-double-u@users.noreply.github.com>
Now we always display the Versions menu but have made it inactive on pages where it doesn't apply.
fixes #304.