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

feat(structure): rename deck to context #51

Closed
wants to merge 3 commits into from

Conversation

andy-blum
Copy link
Member

This PR updates the theme to use context in place of deck in ADR frontmatter, as "deck" is not the most intuitive name for this field.

@deviantintegral
Copy link
Member

Nice! Should we make it so deck still works? Otherwise, I think I would call this a compatibility break and warranting a 2.0 release.

@andy-blum
Copy link
Member Author

I've been working in gatsby-node.js in the onCreateNode hook, which I'm pretty sure is the right place to be doing this, but I've been unable to see - much less modify - node fields.

@e0ipso any chance you can take a look?

Copy link
Member

@e0ipso e0ipso left a comment

Choose a reason for hiding this comment

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

Unfortunately this will be breaking BC for projects using this theme. The component props are part of the interface, via the component shadowing.

Let's make sure that the example site has some ADRs with deck and some with context to ensure BC.

@deviantintegral
Copy link
Member

@andy-blum do you think you'll have time to pick this back up?

@andy-blum
Copy link
Member Author

@e0ipso I've addad an ADR with the deck key changed to context

@@ -17,7 +17,7 @@ module.exports = {
const siteUrl = site.siteMetadata.siteUrl;
return {
title: edge.node.frontmatter.title,
description: edge.node.frontmatter.deck,
description: edge.node.frontmatter.context,
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we also grab deck in case a site upgrades but it's still using the old format?

@@ -40,7 +40,7 @@ module.exports = {
node {
frontmatter {
title
deck
context
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we also grab deck in case a site upgrades but it's still using the old format? Also applies in other places.

@e0ipso e0ipso marked this pull request as draft August 9, 2023 10:57
@andy-blum
Copy link
Member Author

Closing this in favor of our site refactor.

@andy-blum andy-blum closed this Mar 22, 2024
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