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

Browse page #387

Merged
merged 7 commits into from
Sep 11, 2024
Merged

Browse page #387

merged 7 commits into from
Sep 11, 2024

Conversation

sanghoonio
Copy link
Member

This is a work in progress, but opening this PR to discuss how and whether we should update the routing for the browse page from the current /schemas since /schemas/namespace depends on /schemas existing..

Copy link
Member

@nleroy917 nleroy917 left a comment

Choose a reason for hiding this comment

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

Some comments, but at a glance this looks good 👍🏼

style={{ scrollSnapType: 'x mandatory' }}
>
{namespaces ? (
Object.values(namespaces).map((item, index) => (
Copy link
Member

Choose a reason for hiding this comment

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

Not a huge deal, but a pattern I like over this is:

{namespaces && (
 <div> { ... } </div>
 )}

Instead of:

{namespaces ? (
  <div> { ... } </div>
  ) : null
  }

Almost the same, but the first is a bit cleaner


return (
<div className="position-relative">
{renderLongRow()}
Copy link
Member

Choose a reason for hiding this comment

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

Any reason to not just make this a component? I.e. const LongRow = () => { ... }

Comment on lines 6 to 7
import 'bootstrap/dist/css/bootstrap.min.css'
import "bootstrap/dist/js/bootstrap.bundle.min.js"
Copy link
Member

Choose a reason for hiding this comment

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

Is this necessary? I'm pretty sure I have this on the main.tsx component...


export const ProjectAccordion = (props: Props) => {
const { projects } = props;
const [openIndex, setOpenIndex] = useState(null);
Copy link
Member

Choose a reason for hiding this comment

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

Is this used?

Comment on lines 20 to 30
const formatDate = (dateString: string) => {
const date = new Date(dateString);
return date.toLocaleString('en-US', {
year: 'numeric',
month: 'long',
day: 'numeric',
hour: 'numeric',
minute: '2-digit',
hour12: true
});
};
Copy link
Member

Choose a reason for hiding this comment

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

Pull out into utils?

Comment on lines +328 to +329
star.description?.toLowerCase().includes(starSearch.toLowerCase()) ||
star.name?.toLowerCase().includes(starSearch.toLowerCase()),
Copy link
Member

Choose a reason for hiding this comment

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

:)

@sanghoonio sanghoonio merged commit 82ab2f2 into dev Sep 11, 2024
1 check passed
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.

2 participants