-
Notifications
You must be signed in to change notification settings - Fork 36
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 glossary #194
Add glossary #194
Conversation
Copy the styles from FEC
Move glossary JS to its own bundle.
@AvivaOskow @RyanSibley this is ready for your eyes. You can also edit the glossary terms by editing this branch. |
@hbillings this is ready for review. |
} | ||
|
||
// Wait for DOM to be loaded before initializing the glossary | ||
document.addEventListener('DOMContentLoaded', () => { |
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.
Is this something we could potentially fold back into the glossary library? It would be nice to be able to improve that. :-/
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.
Mixed feelings... Generally I prefer libraries to not handle this kind of loading and leave it up to the app. I think it's strange that the glossary calls DOM APIs, because it makes it a bit more difficult to run in environments where the DOM is not available (like running tests in node). I would prefer to pass in DOM elements instead, which would allow the app to control when to re-initialize the glossary in case elements move around or something.
@@ -0,0 +1,108 @@ | |||
/* eslint-disable */ |
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 was kind of thinking this might be easiest to maintain as a markdown file that inherits the json.html
jekyll layout -- what do you think?
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.
Ooo yeah, that is smart.
@@ -0,0 +1,10 @@ | |||
<button class="js-glossary-toggle glossary-toggle">Glossary</button> |
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.
💯 to breaking this out into an include
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 did that!
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.
...oh. Good for me?! 😂
position: fixed; | ||
top: 0; | ||
width: 75%; | ||
z-index: $z-glossary; |
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.
oh, clever, I like that
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'm not really familiar with the uswds scss files, so I'm not sure if they have their own set of variables for this kind of thing. I was surprised to see the z-index so high on the uswds nav.
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.
They don't really have z-index
variables, which I think is kind of surprising. I like being able to track it in one spot!
This is great! I'll let design approve it, but I'm good with it. |
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.
beautiful. does this mean I can edit now?
On Wed, 2017-10-11 at 16:32 -0700, Ryan Sibley ***@***.***> wrote:
RyanSibley approved this pull request.
beautiful. does this mean I can edit now?
Yes! You can edit the `/js/util/glossary/terms.js` on the `add-glossary`
branch. https://github.com/18F/beta.foia.gov/blob/add-glossary/js/util/glossary/terms.js
…--
Aaron D Borden
Human and Hacker
|
@adborden looks good!I I haven't had a chance to play around with the styles yet, but I might want to change a couple small things if we have time design wise. |
Closes #115.
To do: