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

[docs] components - show if prop is required #442

Merged
merged 13 commits into from May 23, 2017
Merged

[docs] components - show if prop is required #442

merged 13 commits into from May 23, 2017

Conversation

tmorehouse
Copy link
Member

Some components have props that are flagged as required.

This PR adds an extra column to props table to show if property is marked as required

Shows true is required, otherwise blank (to not clutter table output)

Coerce slide nodelist into an Array
Added an extra column to props table to show if property is marged as required

Shows `true` is required, otherwise blank (to not clutter table output)
@tmorehouse
Copy link
Member Author

tmorehouse commented May 23, 2017

Option: Could show the word 'Yes' instead of True for Required

What do you guys think?

@alexsasharegan
Copy link
Member

Hmm... either is clear, but I think I lean towards "Yes".

@tmorehouse
Copy link
Member Author

And should we show 'No' if not required or just a blank?

@alexsasharegan
Copy link
Member

I like the no clutter approach, but I suppose having the table column empty would look silly. It would be ideal if the column only appears if there is a required prop (then it would show Yes/No).

@tmorehouse
Copy link
Member Author

tmorehouse commented May 23, 2017

There is the invisible field property now for b-table, which just hides the content of the column (but leaves the space of the column there).

Could get the fields to check if there are any requireds and set the invisible property to true

@alexsasharegan
Copy link
Member

That sounds like cleanest, easiest to understand way.

Adds invisible state to required column if no props are required
@tmorehouse
Copy link
Member Author

Also switched from word True to word Yes

Copy link
Member

@alexsasharegan alexsasharegan left a comment

Choose a reason for hiding this comment

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

👍

@alexsasharegan
Copy link
Member

Wait, is that... never mind! You just changed it!

@alexsasharegan
Copy link
Member

I'm gonna say you caught that before committing an official Troy-o

@tmorehouse
Copy link
Member Author

LOL

@tmorehouse
Copy link
Member Author

tmorehouse commented May 23, 2017

Hmmm. Now I am wondering if it might be better to just remove the required field from the list of fields rather than just making it invisible (which is just visibility:hidden) and have it take up blank space.

Only adds the `Required` column to properties if there are any props with required set.
@tmorehouse
Copy link
Member Author

The Required column will only be rendered if the component has a prop that has a truthy required. And if a prop is required it will show the word 'Yes', otherwise it will be blank.

@tmorehouse tmorehouse changed the title [docs] Show if prop is required [docs] components - show if prop is required May 23, 2017
@pi0 pi0 merged commit c50ec31 into bootstrap-vue:master May 23, 2017
@tmorehouse tmorehouse deleted the docs-required branch May 24, 2017 14:28
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.

None yet

3 participants