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

v1.3.0 #274

Merged
merged 18 commits into from
Oct 28, 2024
Merged

v1.3.0 #274

merged 18 commits into from
Oct 28, 2024

Conversation

vincerubinetti
Copy link
Collaborator

@vincerubinetti vincerubinetti commented Aug 7, 2024

Closes #272
Closes #269
Closes #191 (hopefully)

New template version checklist:


  • 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 Update citations fails on pull request close trigger #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.
  • 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, 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. 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.

@vincerubinetti vincerubinetti changed the title 1.3.0 v1.3.0 Aug 7, 2024
Copy link

github-actions bot commented Aug 7, 2024

PR Preview Action v1.4.7
🚀 Deployed preview to https://greenelab.github.io/lab-website-template/preview/pr-274/
on branch gh-pages at 2024-10-28 16:30 UTC

@vincerubinetti
Copy link
Collaborator Author

Still want to test this out more, to make extra sure the list filter expressions and workflow changes are working, but reviewers can start taking a look.

@vincerubinetti vincerubinetti removed the request for review from falquaddoomi September 22, 2024 17:17
@vincerubinetti
Copy link
Collaborator Author

@cgreene I think this review is going to fall on you, as it's more of a philosophical design change than a technical change, aside from the one section of code that supports the Ruby expression filtering which is a little weird.

I've also "annotated" the diff with comments that hopefully will make it easier to read.

Copy link
Contributor

@falquaddoomi falquaddoomi left a comment

Choose a reason for hiding this comment

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

Nice! Neat that you're using expressions for filters now. I left a few minor comments, but nothing that really needs to be addressed before merging.

.github/workflows/first-time-setup.yaml Show resolved Hide resolved
.github/workflows/update-citations.yaml Outdated Show resolved Hide resolved
_includes/button.html Show resolved Hide resolved
_plugins/misc.rb Show resolved Hide resolved
@vincerubinetti vincerubinetti merged commit 52db24e into main Oct 28, 2024
4 checks passed
@vincerubinetti vincerubinetti deleted the 1.3.0 branch October 28, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants