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

Gallery demo #575

Merged
merged 1 commit into from
Aug 8, 2023
Merged

Gallery demo #575

merged 1 commit into from
Aug 8, 2023

Conversation

Gankra
Copy link
Member

@Gankra Gankra commented Aug 3, 2023

How to build the gallery:

cargo test gal_

How to serve the gallery:

cd target/tmp
cargo run -- serve
  • add harness
  • add build-pass tests
  • add workspace build-pass test ("the gallery")
  • snaphot testing of public/
    • implement (currently filtered to all files that end in .html)
    • fix: stable ordering of platform html in install widget (i think the select is always sorted but the actual entries the select reveals aren't)
    • fix: filter the name of oranda.css (cargo test and cargo test --release write different file names)
  • fix: prevent hanging of gal_workspace (tries to wait for all other tests to signal success, so hangs if any fail to build)
  • fix: make cargo test work without --release (need to make the runtime generate-css function remember where CARGO_MANIFEST_DIR is instead of just going relative to cwd, so that the resulting binary can be run in different dirs on the same system)
  • feat: add a way to do multiple variants of the same repo that works with oranda-workspace.json (cargo-dist can happily edit the same checkout over and over, but oranda-workspace wants each variant to exist at the same time, so I'll probably just add a variant of run_test that takes a custom id (checkout dir name) so that you can checkout the same repo multiple times)
  • fix: ??? some way to prevent new Github Releases adding new data to the tests and causing snapshots to invalidate?
  • fix: ??? visually distinguish variant gallery entries (if you have multiple copies of cargo-dist, workspace-index.html makes no visual distinction between the two, you can only tell based on the url of the "website" link)

@Gankra
Copy link
Member Author

Gankra commented Aug 4, 2023

all the issues with oranda-gallery are fixed, but i realized a new one: snapshotting is fundamentally brittle to the fact that we source Github Releases for data, so any new Github Releases will change several pages and cause the tests to fail

(and having oranda-itself in the gallery means cutting an oranda release will break oranda's own tests... rip)

Possible solutions:

  • Don't snapshot test
  • Incredibly intelligent snapshot test filtering
  • Have a way to archive/clamp github release data to a specific date

EDIT: implemented the 3rd one with DEBUG_DATA_CLAMP_DATE

@Gankra
Copy link
Member Author

Gankra commented Aug 4, 2023

also a note on commit naming here:

  • DEMO: things that are contained to the gallery itself
  • DEMO-HACK: changes to oranda, several of which are genuine fixes that can/should be split off and merged in their own PRs (some may be genuine hacks tho)

@Gankra
Copy link
Member Author

Gankra commented Aug 4, 2023

Seems like a few system-specific slashes are making it into some actual html 😬:

 6724  6724 │ <p>These previews are generated by running oranda on itself.</p>
 6725  6725 │ <h2 id="dark-default"><a class="header" href="#dark-default">Dark (default)</a></h2>
 6726       │-<p><img src="configuration%5Ctheme/../../images/themes/dark.png" alt="dark theme preview" /></p>
       6726 │+<p><img src="configuration/theme/../../images/themes/dark.png" alt="dark theme preview" /></p>

@shadows-withal
Copy link
Contributor

Seems like a few system-specific slashes are making it into some actual html 😬

in mdbook output files, so this seems like a mdbook bug more than anything, we don't do any weird linking or anything afaik

@shadows-withal
Copy link
Contributor

stopped mdbook html files from being output into snapshots, we don't want them there anyways, that's for mdbook itself to test

@shadows-withal shadows-withal force-pushed the gallery-demo branch 3 times, most recently from b1fb9dc to df85452 Compare August 8, 2023 12:07
@shadows-withal shadows-withal marked this pull request as ready for review August 8, 2023 16:49
@shadows-withal shadows-withal merged commit 641d36d into main Aug 8, 2023
7 checks passed
@shadows-withal shadows-withal deleted the gallery-demo branch August 8, 2023 17:03
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.

None yet

2 participants