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

LWT Update Fixes #139

Merged
merged 71 commits into from
Jan 29, 2025
Merged

LWT Update Fixes #139

merged 71 commits into from
Jan 29, 2025

Conversation

cgreene
Copy link
Member

@cgreene cgreene commented Jan 28, 2025

This website is based on the Lab Website Template.
See its documentation for working with this site:

https://greene-lab.gitbook.io/lab-website-template-docs

- complete overhaul of auto-cite architecture
- move auto-cite and related files to dedicated `scripts` folder
- add `__pycache__` to gitignore
- improve logging clarity
- make plugin architecture. plugins take list data from one yaml file at a time, and return a list of sources.
- make config.yaml for plugin order and input files. you can now split up input sources into separate files. example: you have `2019-papers.yaml` `2020-papers.yaml` `2021-papers.yaml` that get processed by the normal `sources` plugin, and `current-orcid.yaml` `alumni-orcid.yaml` that get processed by the `orcid` plugin
- orcid plugin copies over any metadata to each source it returns, which can be used for filtering. example: `- orcid: 09182-12398-912837-129387 page: alex-lee` will return a bunch of papers for that orcid, and each paper will have the field `page` set to `alex-lee`. then that field can be used as a filter in the list component
- fix tooltip bug on safari?
- make the components that look up their info by id more robust by moving variable assignments closer to their use location to avoid variable scoping issues
- filter blank sections and remove unnecessary `break` option in section component
- add ability for list component to read numerical filter values in addition to just strings
- add ability for portrait and post excerpts to look up team member and blog post by id instead of filling out params manually
- add generic two column component
- update documentation for the above
- set tooltip display to none after it fades out to avoid potential layout issues
- move auto-cite configuration from its own separate config file to the main site config, to be less confusing
- make citations component get the location of the auto-cite output citations from the config file, rather than being hard-coded to "citations.yaml"
- take site-wide google search on 404 page and make it into reusable component (see #2)
- remove gallery from readme (since we'll be want to update it somewhat regularly) and move to wiki
- set `img` alt attributes as appropriate
- refactor sections to be only one html element
- load font awesome async for performance
- add spots for extra details in footer, and add ad for template
- move some basic items in head to meta
- turn logo-text config option into simple boolean
- fix small blog post excerpt bug
- defer load all scripts
- move from popper.js to tippy.js for tooltips
- add accessible label to search box
- make tags component accept list or comma-separated values more robustly
- fix two col component bug where it can't accept markdown
- add html doctype and lang to prevent warnings and various issues
- remove bash scripts that no-one should probably be using, and are documented in the wiki anyway
- various css tweaks
- add aria labels to anchors
- fix anchor move-to-parent bug
- on team page, replace dead link to non-existent join page with just some job positing filler details (see #86 for discussion)
- test each page with lighthouse (in chrome dev tools), mobile and desktop
- add webrick for ruby 3.0.0+ support
- add example tags to tools
- remove flex sass mixin
- misc css fixes
- make use of flex gap where appropriate
- 0.9rem for certain sans texts
- fix search box button color to make visible
- add active color to tags
- dedup and add tooltip to tags when fetched from github
- refactor search script, rename "query" to (CSS) "selector" for less confusion, update url from search box and clear buttons
- add clear search link to search info component
- add util script file, including func to normalize strings for comparisons, and debounce func
- simplify css to replace margin with flex gap where possible/appropriate. more simple and robust against direction changes, wrapping, new elements/rows/cols.
- fix regression with feature component when flipped and on small screen
- change "smart" behavior of `search-info`. show/hide based on whether anything searched, not whether anything filtered. more intuitive/expected and simpler. (there can be searches that don't filter anything because every item matches).
- increase manubot log level to "warning" to show message when an invalid identifier type is used
- force manubot logging to gray color
- rearrange `try` blocks around manubot call for a bit better distinction between errors
- make trueHide/trueShow util funcs just be locally `<script>` scoped (like the other util functions) rather than attached to `window`
- change auto-cite github actions workflow to install via requirements.txt (allows us to add more packages later if we need)
- update CFF file
- rebuild demo citations with new cache key
- add explicit cache matching key to sources. do this as a hash of the input source object. so, when any field in the source changes, invalidate the cache. just to be safe and for simpler/less error-prone behavior.
- add special case for when `id` is not defined. in this case, do not pass to manubot (because it will throw error), and instead pass source through untouched.
- move the code that merges in extra/overridden input props into the sources loop to avoid another "match by id" situation" (error prone)  
- force pyyaml to not use references (shows up when there are duplicate data structures)
- rename "find_match" to "get_cached". match by explicit cache key instead of id. if key absent, do not count as match. if more than one match, do not count as match (needed because if there are multiple sources with the same id in the same file, but with different other props, the template could choose the wrong one and screw up the output).
- add requirements.txt
- reformat all python with black formatter
- updated docs to reflect the above.
vincerubinetti and others added 11 commits May 19, 2023 14:59
- various cite process tweaks
- add traceback logging of running plugins
- change variable names for clarity and consistency
- add generic "safe get" function as suggested by Faisal last pr
- use generic safe get in place all of all gets. helps fix bug due to
orcid api sometimes returning none types for certain fields, and other future bugs.
Unpins all cite process python packages from their exact versions, pins
them to **major versions**. This ensures users will be on the latest
versions of packages, without breaking changes (assuming the packages
follow semver properly), and without having to constantly update their
template version (which can be a pain).

Closes #210 
Addresses #211 

FOR THE TEMPLATE MAINTAINER(S)

New template version checklist:

- [x] I have updated CITATION and CHANGELOG as appropriate.
- [x] I have updated lab-website-template-docs as appropriate.
- [x] I have checked the testbed as appropriate.

---------

Co-authored-by: vincerubinetti <[email protected]>
- add discussion templates. be more aggressive requiring fields.
- update to latest version of all github actions (checking for breaking
changes)
- add debug step to each workflow to allow ssh access in
- fix site.location vs page.url bug (see issue)
- add html-proofer plugin to check for broken images and links, disabled
by default because it adds a lot of time to hot-reload, but set
explicitly as false in config so users can easily flip it on
- update bundler version and re-bundle gems
- add "remove" option for cite-process that allows a user to remove a
source from a metasource. e.g., an ORCID returns a source that the user
doesn't want on their site, so in their sources.yaml they put the id and
remove: true.
- by default, ignore sources that manubot can't cite if they're from
metasources (see changelog)
- add markdownify to more component params
- fix bug in citation (and other) components where when lookup is blank,
first entry in list is always chosen
- make use of newly widely available CSS container queries
- remove compilation-time wrapping of tables because it breaks nested
tables, and is not (practically) possible to support them in the same
way. replace with run-time js plugin for wrapping.
- upgrade font awesome and improve loading mechanism
- fix header title/subtitle CSS bug reported by @Maruuka 
- add "image" param to post excerpt component, so blog posts can have
thumbnails
- fix bug that prevents manual passing of tags to tag component
- add heading 5/6 styles/support
- tweak dark mode plugin
- various style tweaks

New template version checklist:

- [x] I have updated CITATION and CHANGELOG as appropriate.
- [x] I have updated lab-website-template-docs as appropriate.
- [x] I have checked the testbed as appropriate.
- [x] I have tested changed workflows on a freshly generated and forked
repo.
- fix bug where literal yaml date object doesn't get parsed correctly
- fixes addition of site.url by gh-actions workflow

New template version checklist:

- [x] I have updated CITATION and CHANGELOG as appropriate.
- [x] I have updated lab-website-template-docs as appropriate.
- [x] I have checked the testbed as appropriate.
Closes #250 
Closes #256 
Closes #260 
Closes #258

- adds `affiliation` to member portrait component
- simplify portrait component code/css
- make tag de-dupe behavior the same as search de-dupe. normalize to
lower-kebab-case.
- expand list of manubot-supported id types for falling back to orcid
api details
- change order and type of preferred ids from orcid

---------

Co-authored-by: Faisal Alquaddoomi <[email protected]>
Co-authored-by: vincerubinetti <[email protected]>
Closes #272 
Closes #269 
Closes #191  (hopefully)

New template version checklist:

- [x] I have updated CITATION and CHANGELOG as appropriate.
- [x] I have updated lab-website-template-docs as appropriate. Pending
change request:
https://greene-lab.gitbook.io/lab-website-template-docs/~/changes/a57wjuxagDtJUR241kyt/basics/components/list
- [x] I have checked the testbed as appropriate.

---

- use `name` field for all debug/logging steps in workflows
- use `jwalton/gh-find-current-pr` to get PR number to be more reliable
(in rare cases, `github.event.number` can be empty)
- fix bug in "first time setup" workflow where `description` gets
appended to `user` due to missing `\n` in printf
- rename workflows from `.yml` to `.yaml` for consistency
- remove useless "build preview" workflow run in "on schedule" †
- dont run "update citations" workflow on PR close, which should
hopefully avoid issues discussed in #191. in my testing on a fork
(vincerubinetti/lab-website-template), it does. need to use step-level
`if` skipping instead of job-level or workflow-level because of [this
issue](actions/runner#491 (comment)).
- when "on schedule" workflow opens a PR, add hint in body of the PR on
how to trigger the live preview workflow
- use the `xml_escape` liquid filter wherever a user/third-party
provided field is used in an HTML attribute to prevent special
characters breaking HTML rendering. example: `aria-label="{{
citation.title }}"` and `citation.title` is `"Lorem Ipsum" dataset`,
causing attribute to prematurely close.
- change `data_filter` to accept Ruby expressions instead of custom
syntax. use Ruby `eval` and define each field in the item as a local
variable, e.g. `{"animal": "cat"}` lets you use `filter="animal ==
'cat'"`.
- fix heading anchor styles
- add styles for `<details>` element
- fix logo shrinking/growing css bugs

† due to a [github
limitation](https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs),
it wouldn't not run anyway on the auto-created PR. the user must
close/reopen the PR, then the regular "on pr" workflow (which includes
running "build preview") will run. i've already [updated the docs to
talk about
this](https://greene-lab.gitbook.io/lab-website-template-docs/basics/citations#periodic-updates).
from now on, let's treat auto-opening PR as the only supported way.
previously i considered that the user could change `open-pr` to `false`
to have "on schedule" commit updated citations directly to `main`, but
let's nix that to maintain simplicity. it's probably better that we
force the user to review the changes before pushing them to their live
site anyway. if we did want to support that in the future, the "build
preview" run i removed would have to be changed to a "build site", since
we'd want to be re-building the `main` branch version of the site, not a
preview for a PR.

---------

Co-authored-by: Faisal Alquaddoomi <[email protected]>
Closes #288
Closes #287 
Closes #285

New template version checklist:

- [x] I have updated CITATION and CHANGELOG as appropriate.
- [x] I have updated lab-website-template-docs as appropriate.
- [x] I have checked the testbed as appropriate.

---

- use latest major version of setup-ruby gh-action
- run "commit cache" step if citations step fails so that progress
(successful citations) will be saved
- replace xml_escape filter with appropriate escapes for each situation,
and slightly modify regex_strip filter to allow some basic punctuation
Closes #293 
Addresses #294
Closes #295 
Addresses #296

- "pi" -> "principal-investigator" to encourage more specific names
- add bluesky icon by default
- fix header/footer/section background image regressions from v1.3.0
- upgrade font awesome version
- do full audit of changes from v1.3.0 and v1.3.1, and all `_escape`
filters applied. make fixes/simplifications where applicable.

FOR THE TEMPLATE MAINTAINER(S)

New template version checklist:

- [x] I have updated CITATION and CHANGELOG as appropriate.
- [x] I have updated lab-website-template-docs as appropriate.
- [x] I have checked the testbed as appropriate.
Closes #298 
Closes #301 
Closes #302 

- adds support for multiple blog post authors
- improves citation error logging
- adds status badges to first time setup workflow to add it to user
readmes

New template version checklist:

- [x] I have updated CITATION and CHANGELOG as appropriate.
- [x] I have updated lab-website-template-docs as appropriate.
- [x] I have checked the testbed as appropriate.
- jekyll-spaceship
- jekyll-sitemap
- jekyll-redirect-from
- jekyll-feed
- jekyll-last-modified-at

# code block syntax highlighting
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be added though.

@@ -85,18 +72,3 @@ exclude:
- README.md
- LICENSE.md
- CITATION.cff

Copy link
Contributor

Choose a reason for hiding this comment

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

This should be kept though. I don't think the site will build properly without this.

Copy link
Contributor

github-actions bot commented Jan 29, 2025

PR Preview Action v1.4.7
🚀 Deployed preview to https://greenelab.github.io/greenelab.com/preview/pr-139/
on branch gh-pages at 2025-01-29 16:44 UTC

@vincerubinetti
Copy link
Contributor

Okay. I've done a bunch of stuff with this PR. I tried doing my own merge conflict resolution after reverting to 1.2.1. I also tried starting from a fresh copy of the latest template, and copying your website's content into it.

Finally I've discovered that this is some kind of really weird edge case bug involving the a specific combination of using {% include section.html %} section breaks in blog posts and in blog/index.md, and the data-search="{{ search }}" line in _include/post-excerpt.html.

I have a better idea of what's going on, but not a complete picture. But for now, I've pushed a fix that just removes the section breaks from the blog posts:
13ccdd9

Here I also fixed some duplicate content that results from the git auto-merging process, and updated your team page to use the new list component filter param instead of the old filters param.

@cgreene
Copy link
Member Author

cgreene commented Jan 29, 2025

Wild! I definitely appreciate your work on this. Is your recommendation to merge this for now and then come back at some future point in time?

@vincerubinetti
Copy link
Contributor

Its going to take me a bit to fully understand this and fix it, so yeah I think you can merge. Do double check the diff and preview pages before merging.

@cgreene
Copy link
Member Author

cgreene commented Jan 29, 2025

I've got double blogs on the nav bar, so I can take a look at that.

@cgreene
Copy link
Member Author

cgreene commented Jan 29, 2025

Found it - just fixed via contact page changes. Will keep checking.

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