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

Reimplement /feedstock-outputs in Docusaurus #2064

Merged
merged 9 commits into from
Jan 31, 2024

Conversation

jaimergp
Copy link
Member

@jaimergp jaimergp commented Jan 28, 2024

PR Checklist:

  • note any issues closed by this PR with closing keywords
  • put any other relevant information below

Part of #1971. Needs conda-forge/feedstock-outputs#58.

The new implementation will be available under /packages. /feedstock-outputs redirects there.

@jaimergp
Copy link
Member Author

Short video demo with the current prototype:

Screen.Recording.2024-01-28.at.23.16.23.mov

@jaimergp
Copy link
Member Author

cc @asmitbm

@jaimergp
Copy link
Member Author

One more update:

Screen.Recording.2024-01-29.at.12.20.43.mov

@jaimergp jaimergp changed the title prototype feedstock outputs redesign Reimplement /feedstock-outputs in Docusaurus Jan 30, 2024
@jaimergp jaimergp marked this pull request as ready for review January 30, 2024 17:05
@jaimergp jaimergp requested a review from a team as a code owner January 30, 2024 17:05
@jaimergp
Copy link
Member Author

conda-forge/feedstock-outputs#58 is now merged, so this is ready for review.

Co-authored-by: jaimergp <jaimergp@users.noreply.github.com>
@beckermr
Copy link
Member

We need to turn off gh pages on the outputs repo before merging. Let me know when!

@jaimergp
Copy link
Member Author

I think we can do it right after merging here! Thanks @beckermr!

@asmitbm
Copy link
Contributor

asmitbm commented Jan 30, 2024

I was thinking if we can center the table and contents for better view. And I'll look if I can have a fix size for the table as it is changing based on the content on every search performed

@jaimergp
Copy link
Member Author

I'm logging out for today, so I'll merge tomorrow morning as I disable GH pages on the feedstock-outputs repo.

If you want to suggest a couple patches in the meantime, go for it @asmitbm. If not, we can address the UI refinements in subsequent PRs. Thanks!

Copy link
Contributor

@asmitbm asmitbm left a comment

Choose a reason for hiding this comment

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

Added CSS styling to center the contents on the page


return (
<div
className={["container", "margin-vert--lg"].join(" ")}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
className={["container", "margin-vert--lg"].join(" ")}
className={["container", "margin-vert--lg"].join(" ")}
style={{ overflowX: 'auto', display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center' }}

Copy link
Contributor

Choose a reason for hiding this comment

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

To center the contents on the page.

Copy link
Member Author

Choose a reason for hiding this comment

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

Would it be better to have a styles.module.css file to avoid inline styles?

Copy link
Contributor

Choose a reason for hiding this comment

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

We can achieve that, but it would require updating class names across the entire page to follow the format className={styles.table}.

</label>
</div>
</form>
<table>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<table>
<table style={{ width: '100%', tableLayout: 'fixed', borderCollapse: 'collapse'}}>

</form>
<table>
<thead>
<tr>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<tr>
<tr style={{ border: '1px solid #ddd', padding: '8px' }}>

{(filteredPackages.length &&
filteredPackages.map((pkg) => (
<tr key={pkg.name}>
<td>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<td>
<td style={{ border: '1px solid #ddd', padding: '8px' }}>

{highlightSubstring(pkg.name, searchTermLower)}
</a>
</td>
<td>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<td>
<td style={{ border: '1px solid #ddd', padding: '8px' }}>

@jaimergp
Copy link
Member Author

I tried the suggestions locally but, while centered, the table width is still content-dependent, which makes everything jump a bit as the table gets regenerated. I'm going to merge for now to see if the whole thing works in production, and we can adjust the UI later.

@jaimergp jaimergp merged commit c245d61 into conda-forge:main Jan 31, 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
Development

Successfully merging this pull request may close these issues.

3 participants