Skip to content

Score example hub #179

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

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from
Draft

Score example hub #179

wants to merge 21 commits into from

Conversation

TobiasBabin
Copy link
Contributor

Thank you for submitting this pull request! We appreciate you spending the time to work on these changes.

What is the motivation?

These changes will introduce a "Score example hub" to help users of Score find ready-to-use examples already available in other Score repos like the Score examples more easily and at a central place.

This PR covers the first iteration of the example hub to integrate examples for core Score usage. Future PRs will add Resource provisioners and Patch templates.

What does this change do?

This change

  • Adds a Git-based integration of the relevant Score repositories into the directory structure of the present repo
  • Adds GitHub automation to periodically update this content
  • Adds tooling to generate interactive pages to browse, filter, and consume example content
  • Adds GitHub automation to periodically update these pages based on updated external repo content

What is your testing strategy?

  • Create and run the entire Hugo site locally including the newly generated example hub.
  • Have the GitHub automation run on the underlying branch. We can switch it to run on main only before merging.

Is this related to any issues?

No.

Have you read the Contributing Guidelines?

…t 928f47e

git-subtree-dir: gen/external-repos/score-spec/examples
git-subtree-split: 928f47e08f163943f7ba153938b64513a781e237
@TobiasBabin TobiasBabin marked this pull request as draft May 16, 2025 08:34
TobiasBabin and others added 18 commits May 16, 2025 10:42
…ent from commit 6a20bf3

git-subtree-dir: gen/external-repos/score-spec/community-provisioners
git-subtree-split: 6a20bf34acc2a7dcaf261357f2ff781f2054b3c0
…nal-repos/score-spec/community-provisioners'

Signed-off-by: Tobias Babin <[email protected]>
Signed-off-by: Tobias Babin <[email protected]>
Signed-off-by: Santiago Beroch <[email protected]>
Signed-off-by: Santiago Beroch <[email protected]>
Signed-off-by: Santiago Beroch <[email protected]>
Signed-off-by: Santiago Beroch <[email protected]>
Signed-off-by: Santiago Beroch <[email protected]>
Signed-off-by: Mathieu Benoit <[email protected]>
@mathieu-benoit mathieu-benoit self-requested a review June 9, 2025 18:48
@mathieu-benoit
Copy link
Contributor

Great stuff in there, thanks @sberoch!

Just did some tests, so sharing and capturing some screenshots here.

image image image

Copy link
Contributor

@mathieu-benoit mathieu-benoit left a comment

Choose a reason for hiding this comment

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

Super great, thanks!

I have some comments that require some updates please, captured while I was testing this PR:

  1. yarn run dprint check was failing, I needed to fix the CI by running and commiting yarn fmt here 99b825d, is it something that could be fixed in the script generating these files?

  2. When running yarn run hugo server, we are getting this new warning WARN calling IsSet with unsupported type "invalid" (<nil>) will always return false., could we fix this?

  3. I'm seeing a new behavior when opening the website, in the navigation panel on the left, all the menu items are expanded by default, it was not the case before. Only the one with the focus, when we click on it, was expanded. Is that on-purpose or could we get back to the previous behavior?

  4. When clicking on Service under the Resources section and not the Specification section, it's actually showing the Service from the Specification section:

image
  1. Apparently some of the info and actions in the header were lost? See in this screenshot where we see the 4 min read and all the actions on the top right corner (View page source, Edit this page`, etc.), could we have them back please?
image
  1. Apparently some of the info in the footer were lost too? See in this screenshot where we see the Last modified June 4, 2025... and the email, twitter, github, slack icons:
image
  1. For any Score file when clicking on (view on GitHub) we are getting a 404 because landing to https://github.com/score-spec/examples/blob/main/score/specification/ instead of https://github.com/score-spec/examples/blob/main/specification/

  2. The style around the tabs seems bit different from what we have today (round corner, tab selected with pink border), could we be consistent here and have the same style as before? See here:

image
  1. I'm seeing a styling issue on this page, seeing this now (grey + link, but text not visible):
image

@TobiasBabin
Copy link
Contributor Author

Awesome @sberoch , thanks a lot! I also tested the pages and found just these items to look at, adding on to @mathieu-benoit 's findings.

All test URLs referring to running the site locally.

  1. Following up on item 4. in @mathieu-benoit 's comment:

I actually cannot reproduce it, works as expected in my local site.

  • When I select "Specification - Service", I get the "Specification" example
  • When I select "Resources - Service", I get the "Resources" example
  • When I select both, I get nothing, which is expected

@mathieu-benoit Can you double-check

  1. README display for community provisioners

This example correctly shows the example files in the score-compose and score-k8s tabs. It does not yet show the READMEs because we have not added them yet to the sources. They will be located at

  • /examples/score/community-provisioners/score-compose.md
  • /examples/score/community-provisioners/score-k8s.md

If I temporarily add them here manually and re-generate the site, they are displayed, but then the examples files are not shown anymore.

Desired state: the README content plus the example files are shown.
See this section in the FigJam spec board.

  1. Search bar not shown in example section

Can we have the search bar while in the examples section? It is currently not shown.

image

  1. Nit: When using the new top menu to switch between "Documentation" and "Examples", do not open a new tab.

  2. Nit: Keep "Examples" highlighted in the top menu when browsing the examples, not just on the /examples landing page

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.

3 participants