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

fix: example thumbnail build #5522

Merged
merged 5 commits into from
Jul 31, 2023
Merged

fix: example thumbnail build #5522

merged 5 commits into from
Jul 31, 2023

Conversation

epreston
Copy link
Contributor

The file and content exists in the generated site content but the class for this example is commented out. This bocks thumbnails from being generated for the whole project.

Related: #5521

I confirm I have read the contributing guidelines and signed the Contributor License Agreement.

The file and content exists in the generated site but the class for this example is commented out.  This bocks thumbnails from being generated.
@epreston epreston changed the title Fix: example thumbnail build fix: example thumbnail build Jul 30, 2023
@willeastcott
Copy link
Contributor

willeastcott commented Jul 30, 2023

Hey @mvaligursky and @slimbuck, I know this example was hidden because it's not ready for public comsumption. But if it's breaking the build, we should either merge this or figure out a way to hide it without breaking stuff. I'll leave it to you two to decide.

@epreston
Copy link
Contributor Author

epreston commented Jul 30, 2023

It's not being hidden when you build examples. It is there in the list of examples, just no thumbnail. The thumbnail builds break halfway through leaving only half thumbs. Example works great otherwise.

@mvaligursky
Copy link
Contributor

For now we need to remove the example (instead of commenting it out). It works, but the API is not finalised / public yet.
We used to have HIDDEN option in the example being supported before, to skip adding those examples to the list before, but that seems gone now, so we just need to remove its import for now.

@epreston
Copy link
Contributor Author

Understood, I'll update.

Looks like the easiest path is to exclude it the way "index.mjs" is excluded.

@mvaligursky
Copy link
Contributor

Yep, we should just remove those two lines with LitMaterialExample in them from the index.mjs

@epreston
Copy link
Contributor Author

epreston commented Jul 31, 2023

The thumbnails are built by enumerating files in a directory. It's going to search for that code if it does not ignore the file, commented or not, that's the issue.

Ignore the file so it does not go searching for the definitions (commented or not)
@mvaligursky
Copy link
Contributor

Ah I see. Hmm, this feels pretty hidden way to do this, I can see somebody spending time trying to figure out why this example does not have a thumbnail in the future. Perhaps add a log when this name is filtered out, so that we're aware, thanks.

Ensure temporary filter is noted after building thumbs.
@epreston
Copy link
Contributor Author

I'm knee deep in the examples build stuff. I'd like to add that HIDDEN option back in, would a PR for that be welcome ?

@mvaligursky
Copy link
Contributor

I'd like to add that HIDDEN option back in, would a PR for that be welcome

It would be very much appreciated to have it back, thanks for looking at this!

Exclude LitMaterialExample example from build products.
Copy link
Contributor

@mvaligursky mvaligursky left a comment

Choose a reason for hiding this comment

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

Perfect, thanks, commenting out is great.

@mvaligursky mvaligursky merged commit 22f7c24 into playcanvas:main Jul 31, 2023
7 checks passed
@epreston epreston deleted the fix-example-thumbnails-build branch July 31, 2023 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants