Skip to content

Refactor site#493

Merged
hdashnow merged 55 commits into
mainfrom
refactor-site
Jun 25, 2026
Merged

Refactor site#493
hdashnow merged 55 commits into
mainfrom
refactor-site

Conversation

@vincerubinetti

@vincerubinetti vincerubinetti commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Description

This is a very large change that affects basically everything in the /site folder. When I first scaffolded the site, I avoided adding extra complication since non-web-developers would be editing it. But after encountering several bugs that would've been avoided by type-safety, and accumulating a bunch of utility and one-off style classes, I wanted to just upgrade the code base to modern best practices, even if it makes changes a bit more difficult for others.

Unfortunately, we should review the entire site page by page to make sure nothing has broken.

I did make some opinionated changes that may end up being reverted:

  • To make layout on the locus page more predictable and clean, I got rid of a lot of the conditional rendering. This means that info boxes are often empty, but what you get in return is that they'll always be in the same position, which can be good for muscle memory and comparing tabs side by side. It also has a secondary benefit of showing the user what types of info we have about loci in general, even if this locus is missing some of it.
  • I changed the evidence colors to something that I think looks more consistent and readable. Iirc, you wanted to match what some external site was doing for coloring, but perhaps it's okay to blaze our own trail here.

If you have any questions or would like an in-person walkthrough of these changes, lmk.

Major Changes

  • Convert to typescript
  • Convert from vanilla css to tailwind
  • Fresh coat of paint (update theme colors, styles, etc)
  • Make locus page layout more static (less conditional rendering of sections and boxes)
  • Closes Website changes #343

Checklist

  • All changes are well summarized
  • Check all tests pass
  • Check that the website preview looks good
  • Update the STRchive version in CITATION.cff, format X.Y.Z. If any major changes, increment Y. If only minor changes, increment Z. If the breaking change (rare), increment X.
  • Ask someone to review this PR

@netlify

netlify Bot commented Jun 19, 2026

Copy link
Copy Markdown

Deploy Preview for strchive canceled.

Name Link
🔨 Latest commit 9f21212
🔍 Latest deploy log https://app.netlify.com/projects/strchive/deploys/6a3caf3b2954cd00080d5190

@vincerubinetti vincerubinetti requested a review from hdashnow June 19, 2026 15:29
@hdashnow

Copy link
Copy Markdown
Member

@vincerubinetti would it be helpful to add a references field in criTRia for consistency? It is indeed a convenience field and would be easy to create/update during the json validation step.

@hdashnow

Copy link
Copy Markdown
Member

Could you please move the criTRia download buttons to the top right corners of their respective tables? That will make it consistent with the locus table and easier to find.

The colors and symbols look better to me now. I am noticing that the "No Known" and "Limited" are the same/similar colors. I think "No Known" should be grey (closest to "Provisional" in meaning).
Screenshot 2026-06-22 at 1 23 22 PM

@hdashnow

Copy link
Copy Markdown
Member

We also added a new field to the locus pages since you started this PR. Something like this is needed:

      <!-- detection -->
      <div class="box">
        <strong>Detection</strong>
        {locus.detection && <div>{locus.detection}</div>}
      </div>

@hdashnow

hdashnow commented Jun 22, 2026

Copy link
Copy Markdown
Member

@vincerubinetti would it be helpful to add a references field in criTRia for consistency? It is indeed a convenience field and would be easy to create/update during the json validation step.

I added references

@vincerubinetti

vincerubinetti commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

@vincerubinetti would it be helpful to add a references field in criTRia for consistency?

That seems good for people consuming the json. For me, it doesn't make much of a difference since I have to keep a running list of the references I've extracted from the fields anyway. And I'm thinking it makes sense for me to use my personal lists rather than the reference fields. This way the displayed references always match the same logic I'm using to extract them from the fields. And, if there's a difference between your extraction and my extraction logic (e.g. regex differences), it might be more noticeable this way, since the references section itself would be a different length or something.

We also added a new field to the locus pages since you started this PR. Something like this is needed:

Added a full width box after mechanism.

Could you please move the criTRia download buttons to the top right corners of their respective tables? That will make it consistent with the locus table and easier to find.

Changed. What are your thoughts on just making all tables downloadable by default, and making the download button part of the standard controls (and moving all the controls to the top), e.g.:

Screenshot 2026-06-22 at 10 25 07 AM

The colors and symbols look better to me now. I am noticing that the "No Known" and "Limited" are the same/similar colors. I think "No Known" should be grey (closest to "Provisional" in meaning).

Changed

@hdashnow

Copy link
Copy Markdown
Member

What are your thoughts on just making all tables downloadable by default, and making the download button part of the standard controls (and moving all the controls to the top)

I think this is a good idea.

Let me know if you'd like me to add a merge commit or rebase to re-align this branch with main.

@vincerubinetti

Copy link
Copy Markdown
Contributor Author

I've already done a merge commit that updates everything outside /site to match main, and everything inside /site to take this branch (but I manually re-incorporated stuff like the detection).

Copilot stopped work on behalf of hdashnow due to an error June 24, 2026 21:58

@hdashnow hdashnow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks good to me. Let me know if it's ready to merge.

@vincerubinetti

Copy link
Copy Markdown
Contributor Author

I tested it pretty thoroughly and it all seems good to me. Ready for merge.

@hdashnow hdashnow merged commit 72f893b into main Jun 25, 2026
6 checks passed
@hdashnow hdashnow deleted the refactor-site branch June 25, 2026 04:57
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.

Website changes

3 participants