Skip to content

feat: Add examples from schema#185

Merged
bsmth merged 7 commits into
mozilla:mainfrom
bsmth:schema-examples
Jul 6, 2026
Merged

feat: Add examples from schema#185
bsmth merged 7 commits into
mozilla:mainfrom
bsmth:schema-examples

Conversation

@bsmth

@bsmth bsmth commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Description:

Additions:

  • Add an ## Examples section to each page
  • A new PolicyExample component, reading from the schema by policy name

Changes:

  • Adding the <PolicyExample policy="PolicyName" /> component on each page

Motivation:

Copy-paste ready examples, sourced from the schema

Related issues and pull requests:

@bsmth bsmth requested review from argl and mkaply June 15, 2026 12:41
@bsmth bsmth marked this pull request as draft June 15, 2026 14:41
@bsmth

bsmth commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator Author

Marking as draft for the moment while we look at the upstream examples / schema

@argl argl left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Having to import explicitely in every file looks a bit clumsy. But if that is the astro way, go with the flow. Otherwise fine, this is a valuable step towards a cleaner data flow and a welcome automation.

@bsmth bsmth marked this pull request as ready for review July 6, 2026 10:59
@bsmth

bsmth commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator Author

Having to import explicitely in every file looks a bit clumsy. But if that is the astro way, go with the flow. Otherwise fine, this is a valuable step towards a cleaner data flow and a welcome automation.

Agreed, can you check 7561a33

@bsmth bsmth requested a review from argl July 6, 2026 11:05
@argl

argl commented Jul 6, 2026

Copy link
Copy Markdown

Having to import explicitely in every file looks a bit clumsy. But if that is the astro way, go with the flow. Otherwise fine, this is a valuable step towards a cleaner data flow and a welcome automation.

Agreed, can you check 7561a33

Yes, that looks much nicer. The IDE problem is on the linter side in my view. It should be possible to configure auto-imported/global objects.

@mkaply

mkaply commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Can we remove anything that's boolean?

We should remove the boolean examples is the schema as well (this is what Chrome does)

And then we should write code that generates the mac policy example based on the JSON example.

I'll look to remove OMA-URIs completely and make them part of the policy templates.

@bsmth

bsmth commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator Author

Can we remove anything that's boolean?

We should remove the boolean examples is the schema as well (this is what Chrome does)

For this PR, let's hide them. The improvements / changes to the schema come from upstream.

And then we should write code that generates the mac policy example based on the JSON example.

Sounds great, let's have a look in a follow-up

Also removing the policies.json pseudo based on out-of-band discussion with MKaply.

@bsmth

bsmth commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator Author

Merging now, thanks!

@bsmth bsmth merged commit 86bc737 into mozilla:main Jul 6, 2026
1 check passed
@bsmth bsmth deleted the schema-examples branch July 6, 2026 16:28
@bsmth bsmth mentioned this pull request Jul 7, 2026
1 task
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