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

BDS-1573 action element schema #1789

Merged
merged 8 commits into from
Mar 27, 2020

Conversation

remydenton
Copy link
Collaborator

Jira

http://vjira2:8080/browse/BDS-1573

Summary

Add schema for BoltActionElement

Details

  • Create a schema to document BoltActionElement
  • Uses the BoltActionElement schema in bolt-button (including removing usage of deprecated props from pl documentation)
  • Update bolt-link schema to be js-based
  • Uses the BoltActionElement schema in bolt-link (including removing usage of deprecated props from pl documentation)

How to test

  • Confirm that the schema docs for bolt-button and bolt-link both show the inherited props from BoltActionElement (including href and url)
  • Confirm that the schema docs for bolt-link does not have a disabled prop (follow up ticket in http://vjira2:8080/browse/BDS-2072)
  • Confirm no regressions (tests passing, etc-- this PR shouldn't modify functionality).

Copy link
Collaborator

@danielamorse danielamorse left a comment

Choose a reason for hiding this comment

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

@remydenton nicely done 👍

I have one suggestion, to move url and target props higher up in the Link schema table, since these are some of the most commonly used props.

I pushed a branch with the change if you want to take a look or pull it in directly. See commit.

Do these edits make sense to you?

@sghoweri
Copy link
Contributor

@remydenton have we confirmed what happens with the global data store if more than one schema gets exported in that element.schemas.js file?

@sghoweri sghoweri modified the milestones: v2.20.0, v2.21.0 Mar 26, 2020
@remydenton
Copy link
Collaborator Author

Thanks @danielamorse, I think that's a great addition. I'll use your updates for link and make similar ones for button.

@sghoweri, I've got questions about the global data store, I'll follow up on Slack.

@sghoweri
Copy link
Contributor

Thanks @danielamorse, I think that's a great addition. I'll use your updates for link and make similar ones for button.

@sghoweri, I've got questions about the global data store, I'll follow up on Slack.

@remydenton Ask away!

@remydenton
Copy link
Collaborator Author

@danielamorse, I realized once I started that changing the order isn't really as appropriate for button since url are target are relatively less important. You probably came to the same conclusion before I did 😄 . I merged in your updates for link.

@sghoweri, I've confirmed that you can access the schemas from the element package like this:
{% set schema = bolt.data.components["@bolt-element"].schema.boltActionElement %}

If more schemas that get added to bolt element in the future, you can just change the last part of that expression to reference the one you want.

@remydenton remydenton merged commit 28d57ce into master Mar 27, 2020
@remydenton remydenton deleted the feature/BDS-1573-action-element-schema branch March 27, 2020 16:37
@sghoweri
Copy link
Contributor

sghoweri commented Apr 8, 2020

PR was released with v2.21.0

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.

4 participants