Skip to content
This repository was archived by the owner on Jan 20, 2022. It is now read-only.

docs: add glossary to specifications#71

Closed
mnajdova wants to merge 4 commits intomasterfrom
spec/glossary
Closed

docs: add glossary to specifications#71
mnajdova wants to merge 4 commits intomasterfrom
spec/glossary

Conversation

@mnajdova
Copy link
Collaborator

@mnajdova mnajdova commented Jul 11, 2018

⚠️ Moved: microsoft/fluent-ui-react#4


Added initial glossary specification. We can split this later into multiple files.

@codecov
Copy link

codecov bot commented Jul 11, 2018

Codecov Report

Merging #71 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #71   +/-   ##
=======================================
  Coverage   68.34%   68.34%           
=======================================
  Files          66       66           
  Lines        1055     1055           
  Branches      177      177           
=======================================
  Hits          721      721           
  Misses        330      330           
  Partials        4        4

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4dcda65...211f33c. Read the comment docs.

@levithomason levithomason changed the title Spec/glossary docs: add glossary to specifications Jul 12, 2018

Types cannot be used simultaneously on the same element. For example, "cats" and "dogs" are types of animals, but are mutually exclusive.

<b>Comment</b>: We should use types for defining the standard appearance of the component. What we have so far is using the primary and secondary as types, which in my opinion are variations of the component that are only between themselves mutually exclusive. So, we can define those as enum variation of the component, but sadly we so far come up with the name 'type' for the prop that can be confusing. I propose we change the name of this prop with something like suiStyle (bootstrap has something similar – bsStyle). Should we add here the positive and negative props as well? After this we can use one prop with enum for defining all different types of the component (similar in a way of the shape property in the current [Menu component](https://github.com/stardust-ui/stardust/pull/68)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added here comment about whether we should replace the type property with something like suiStyle, for setting the primary, secondary, positive or negative variations of the components. Now that we have introduced the shape property, we can still stick with the type property as initially. We should decide on this and I will change the description accordingly.

Copy link
Collaborator

Choose a reason for hiding this comment

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

my opinion on that is that type is a much pleasant name in contrast to suiStyle - while the later one seems more specific, the problem is that it is not as intuitive for the client as the first one. It would be really hard for the client to remember it in a way to not use docs as a refresher

Copy link
Collaborator

Choose a reason for hiding this comment

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

with that being said, would rather suggest to apply primary and secondary as props, even given that they do not fit common logic so far. Another option is to come up with another property name that is not library specific (is close to the general notion), like kind or something like that

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am definitely for having one prop with different values for the primary, secondary, positive and negative, as a hint to the user that these cannot be applied at the same time. And yes, I agree that we should come up with a good name, as this is one of the props which will be most commonly used. @levithomason any thoughts on this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I propose we merge this PR as is now. In the glossary table this property is described as type, which is the current implementation, and we can update it later if we think it would be appropriate. All other PRs should update this table if they are introducing new props, and we still don't have this merged on the master which can become a problem. @kuzhelov ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

agree, it could work as long as we won't introduce another possible types for components (that could be applied at the same time with primary or secondary). At this point we could rethink this taken approach

fixed | Used to make the component fixed to a side of it's content. ('left', 'right', 'top', 'bottom')
textAlign | Align the content. ('left', 'right', 'center', 'justified')
vertical | Used to make the component display it's content vertically.
shape | Used to describe the shape of the component. For example for the Menu component, beside the default, we have the following shapes: ('pills', 'pointing', 'underlined')
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm adding a new property to the buttons that have icons, called iconPosition; it can

  • description line that I'm proposing:
    +iconPosition | Used to describe if an icon is positioned to the left or to the right of the main component. Default value is 'left' ('left', 'right')

  • example of usage in Button component:

<Button icon="book" iconPosition="right" content="click" />

fyi: @mnajdova @levithomason @kuzhelov

Copy link
Member

@levithomason levithomason left a comment

Choose a reason for hiding this comment

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

Let's merge this and iterate on it in more focused PRs. This is a good baseline to get us started.

@levithomason levithomason changed the title docs: add glossary to specifications ... Jul 20, 2018
@levithomason levithomason changed the title ... docs: add glossary to specifications Jul 20, 2018
@levithomason levithomason changed the title docs: add glossary to specifications ... Jul 20, 2018
@levithomason levithomason changed the title ... docs: add glossary to specifications Jul 20, 2018
@levithomason
Copy link
Member

⚠️ Moved: microsoft/fluent-ui-react#4

@levithomason levithomason deleted the spec/glossary branch July 20, 2018 23:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants