Skip to content

Feature/intro#193

Merged
meganrm merged 9 commits intomainfrom
feature/intro
May 28, 2025
Merged

Feature/intro#193
meganrm merged 9 commits intomainfrom
feature/intro

Conversation

@meganrm
Copy link
Copy Markdown
Contributor

@meganrm meganrm commented Mar 31, 2025

Problem

Estimated review size: small

closes #190

Solution

Added a landing page that renders at the beginning of the app

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Steps to Verify:

  1. bun dev
  2. the new landing page shows

Screenshots (optional):

Screenshot 2025-03-31 at 12 51 45 PM

@meganrm meganrm requested a review from a team as a code owner March 31, 2025 19:52
@meganrm meganrm requested review from frasercl and toloudis and removed request for a team March 31, 2025 19:52
}

export enum Section {
LandingPage = 0,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

did you reserve 0 on purpose, knowing you were eventually going to add this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah, it was also easier for having the page number system be 1 indexed.

doi:10.2210/rcsb_pdb/goodsell-gallery-021
</div>
<div>
This painting is part of “VAX,” a series of paintings
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think when it's a title you can put the comma after the closed quote..

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

oh you're right, I copied this text from his website

Copy link
Copy Markdown
Contributor

@frasercl frasercl left a comment

Choose a reason for hiding this comment

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

One larger organization comment that I think is likely worth addressing, but looks good overall

Comment on lines +30 to +39
section,
landingPage,
}) => {
const getContent = () => {
if (section === Section.LandingPage) {
return landingPage;
} else {
return content;
}
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Currently, both the landing page and content are rendered before they are passed to this component, but only one is ever on screen. Could this content picking function be lifted to App instead, where it can select which JSX to actually render? Might make more sense there anyways, since beyond a class name there's not really a layout difference between landing page and content. Alternatively, the types of landingPage and content could become () => ReactNode?

>
<div className={styles.content}>
<h1>{title}</h1>
{content}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bit surprised this isn't children... but I see this prop comes from an interface that's used in a number of other components

Welcome to the Binding Affinity interactive application!
Here, you will learn how to determine the strength of
interaction between two molecules in the lab by using
computer simulations.{" "}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

explicit space doesn't appear to be necessary here?

Suggested change
computer simulations.{" "}
computer simulations.

Comment on lines +11 to +15
export const FIRST_PAGE = {
[Module.A_B_AB]: 0, // landing page
[Module.A_C_AC]: 1,
[Module.A_B_C_AB_AC]: 1,
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

could/should this be expressed in terms of the Section type? (e.g. [Module.A_B_AB]: Section.LandingPage,?) Or does that capture a different concept?

@meganrm meganrm merged commit fa2e39d into main May 28, 2025
3 checks passed
@meganrm meganrm deleted the feature/intro branch May 28, 2025 21:23
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.

render landing page with a begin button and background image

3 participants