Skip to content

avoid links and buttons being able to be switched#65

Merged
TomasBankauskas merged 3 commits intomainfrom
button
Nov 23, 2021
Merged

avoid links and buttons being able to be switched#65
TomasBankauskas merged 3 commits intomainfrom
button

Conversation

@vramosp
Copy link
Copy Markdown
Contributor

@vramosp vramosp commented Nov 18, 2021

No description provided.

@netlify
Copy link
Copy Markdown

netlify bot commented Nov 18, 2021

✔️ Deploy Preview for stackbit-components ready!

🔨 Explore the source changes: cd4a766

🔍 Inspect the deploy log: https://app.netlify.com/sites/stackbit-components/deploys/6197f8ae001e900007f99640

😎 Browse the preview: https://deploy-preview-65--stackbit-components.netlify.app

Comment thread models/Link.yaml Outdated
@@ -57,10 +57,6 @@ fields:
options:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if link cannot be changed, maybe it is better to remove this field altogether?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@ScottyMJacobson said he'll take care of cleaning it up :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

cool

Copy link
Copy Markdown
Contributor

@ScottyMJacobson ScottyMJacobson Nov 19, 2021

Choose a reason for hiding this comment

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

@smnh how concerned are we about backwards-compatibility right now? will projects that have a Link with this style field break or just print an error?

either way, let's def make sure to update templates when we link it against this version of stackbit-components so that Links don't have these fields anymore, and if there are Buttons with style Link hanging around, let's make them Links (and vice versa)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ScottyMJacobson I tested this in Studio and style field was removed.

It seems like to release this safely the following things still need to be done.

  • Can you please check the component itself and add the proper guards to link and button if the style prop is missing?
  • Can you also update any content in stackbit-content-packs and remove the style field.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @JugglerX!

Can you please check the component itself and add the proper guards to link and button if the style prop is missing?

They share a common <Action /> component implementation, so I think they're both already safe if style is missing (falls back to default)

Can you also update any content in stackbit-content-packs and remove the style field.

Ah! that was the piece I was missing. I'll go do that

@TomasBankauskas TomasBankauskas merged commit 8d92386 into main Nov 23, 2021
@TomasBankauskas TomasBankauskas deleted the button branch November 23, 2021 21:01
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.

5 participants