-
Notifications
You must be signed in to change notification settings - Fork 9
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
POC ToC #343
POC ToC #343
Conversation
|
||
return ( | ||
<> | ||
<style>{` |
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.
this is fun :D
0c51287
to
b6df38c
Compare
) | ||
} | ||
|
||
export default function App() { |
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.
export default function App() { | |
export default function Toc() { |
public/toc.json
Outdated
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.
were any plans discussed where to host the JSON file long-term? or would it change rarely enough to keep it in git?
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.
so far it was mainly to just see if this even makes sense - my assumption is that if it does, then it's probably best for it to be a Coda column (e.g. parent
) and have the UI backend construct the map of questions. Or something 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.
This layout looks really promising! A few suggestions that should hopefully be easy fixes:
- Text on navigation menu should all be same size. There's no need for headers to be larger since the organization is easily discernible now
- I would start all menu items collapsed by default for cleaner, less overwhelming visual display
- Instead of starting with a blank page, pick an answer to display in the main panel by default, maybe "What is AI safety?" Eventually, this could be some kind of welcome / overview text.
b8099c3
to
b6136ed
Compare
<Header /> | ||
<main className="toc-container" onClick={handleSpecialLinks}> | ||
<ToC toc={toc} selectItem={selectItem} /> | ||
<div style={{flex: '5 3 auto'}}> |
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 would use either .toc-container {...}
in global styles or use inline styles, but let's not combine both approaches in the same compoment, please
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.
agreed, but can't be bothered to now :P
based on this doc
An interactive version deployed to: https://stampy-ui.ai688.workers.dev/toc
I couldn't be bothered to keep the navigation bar floating on the left, so for now it's just a normal element. Should be ok, seeing as this is just to check if it makes sense?