Skip to content

chore: unflag contentCollectionJsonSchema#11379

Merged
Princesseuh merged 13 commits intomainfrom
unflag-ccjsonschema
Jul 31, 2024
Merged

chore: unflag contentCollectionJsonSchema#11379
Princesseuh merged 13 commits intomainfrom
unflag-ccjsonschema

Conversation

@alexanderniebuhr
Copy link
Copy Markdown
Member

@alexanderniebuhr alexanderniebuhr commented Jun 30, 2024

Open questions

  • I need help with the changeset
  • We should finalize the naming of this flag and how to write it Json or JSON, etc.. (cc @sarah11918 for the config naming)

Changes

  • based on discussions in Discord this moves the feature to stable (experimental PR feat: experimental content collection JSON schemas #10145)
  • introduced a new section for contentCollection inside the config, because we might habe other options being stabilized in the future, such as cache, etc.
  • An alternative thought was to move those configs into the content.ts file, but that doesn't felt right
  • renamed the flag to JsonSchema to make use of new config section

Testing

  • updated existing tests to new setting

Docs

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jun 30, 2024

🦋 Changeset detected

Latest commit: 930ddf8

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review labels Jun 30, 2024
@github-actions github-actions bot added the semver: minor Change triggers a `minor` release label Jun 30, 2024
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This PR is blocked because it contains a minor changeset. A reviewer will merge this at the next release if approved.

@matthewp
Copy link
Copy Markdown
Contributor

matthewp commented Jul 3, 2024

Can this wait until 4.13?

@alexanderniebuhr
Copy link
Copy Markdown
Member Author

Fine for me, @ematipico just said in Discord that moving experimental flags to stable was planned for 4.12, so I tried to submit in time..
But since it already exists under the experimental flag, and is not a new feature, I don't see any issue in 4.13!

@matthewp
Copy link
Copy Markdown
Contributor

matthewp commented Jul 3, 2024

The reason to wait is that some people are on vacation that have more context on this feature and would like to get their input on whether it's missing anything or if there's any other reason to delay dropping the flag.

Copy link
Copy Markdown
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

Just noting that I'll come in here before 4.13 to help with the changeset!

@ematipico ematipico added this to the 4.13 milestone Jul 22, 2024
@matthewp
Copy link
Copy Markdown
Contributor

Hey @alexanderniebuhr, talked a bit about this async and we were wondering:

  • Is there ever a reason to turn this feature off? Since users have to use the schema manually it's not something that should really be a bother, I don't think. Just a file in the .astro folder that we already own.
    • The only reason I can think to make it configurable would be if there was a performance issue; like if generating the schemas took a while, but I very much doubt it.

If there's not a reason to disable it, we'd probably favor not having the option at all in config and just always doing it.

@alexanderniebuhr
Copy link
Copy Markdown
Member Author

Since users have to use the schema manually it's not something that should really be a bother, I don't think.

This is the current state, the longterm goal is to improve our language-tools and extension, so users don't need to configure it manually.

Just a file in the .astro folder that we already own.

It's one file for each data collection, so if you have multiple, you get multiple files

The only reason I can think to make it configurable would be if there was a performance issue;

I don't see any performance issue here, but we use a 3rd party dependency to generate schemas, if that fails for any reason, a config flag would allow users to opt-out while we investigate the bug and fix it, otherwise they would need for our fix

we'd probably favor not having the option at all in config and just always doing it.

Your call, I'm happy with both, above is just more context and not any arguments for any sides.

@matthewp
Copy link
Copy Markdown
Contributor

I think everyone is in agreement here in that case, let's remove the config option and just always do this behavior. If there is an error creating the config it can fail gracefully without crashing the dev server.

@sarah11918
Copy link
Copy Markdown
Member

Glad this is making 4.13, @alexanderniebuhr !

To get you started on the changeset, here are my standard docs on what to write for unflagging an experimental feature!

Copy link
Copy Markdown
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

Just some quick thoughts, but otherwise looks good! Congrats on unflagging this feature! 🥳

alexanderniebuhr and others added 2 commits July 25, 2024 22:20
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Copy link
Copy Markdown
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

Approving for docs! 🥳

Copy link
Copy Markdown
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

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

There seems to be many unnecessary whitespace/indent changes in this PR. Is it possible to revert them to not affect the git history?

@alexanderniebuhr
Copy link
Copy Markdown
Member Author

I can revert them, but I got those automaticity based on the format configuration 🤔

@bluwy

This comment was marked as off-topic.

@alexanderniebuhr

This comment was marked as off-topic.

@bluwy

This comment was marked as off-topic.

@alexanderniebuhr

This comment was marked as off-topic.

@bluwy

This comment was marked as off-topic.

@Princesseuh Princesseuh dismissed github-actions[bot]’s stale review July 31, 2024 10:17

It is merge day my dudes

@Princesseuh Princesseuh merged commit e5e2d3e into main Jul 31, 2024
@Princesseuh Princesseuh deleted the unflag-ccjsonschema branch July 31, 2024 10:17
@astrobot-houston astrobot-houston mentioned this pull request Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review semver: minor Change triggers a `minor` release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants