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

POC ToC #343

Merged
merged 3 commits into from
Oct 28, 2023
Merged

POC ToC #343

merged 3 commits into from
Oct 28, 2023

Conversation

mruwnik
Copy link
Collaborator

@mruwnik mruwnik commented Oct 25, 2023

based on this doc

image

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?


return (
<>
<style>{`
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is fun :D

Aprillion
Aprillion previously approved these changes Oct 25, 2023
)
}

export default function App() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
export default function App() {
export default function Toc() {

public/toc.json Outdated
Copy link
Collaborator

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?

Copy link
Collaborator Author

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

@mruwnik
Copy link
Collaborator Author

mruwnik commented Oct 25, 2023

changed to:

image

Copy link
Collaborator

@ccstan99 ccstan99 left a 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.

<Header />
<main className="toc-container" onClick={handleSpecialLinks}>
<ToC toc={toc} selectItem={selectItem} />
<div style={{flex: '5 3 auto'}}>
Copy link
Collaborator

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

Copy link
Collaborator Author

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

@mruwnik mruwnik merged commit ab0fc21 into master Oct 28, 2023
1 check passed
@mruwnik mruwnik deleted the table-of-contents branch October 28, 2023 18:26
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.

3 participants