Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Conversation

@mnajdova
Copy link
Contributor

@mnajdova mnajdova commented Mar 27, 2019

Fixes #896

direction?: 'start' | 'end' | 'top' | 'bottom'

/** The indicator can point towards different directions. */
code?: 'arrow' | 'close'
Copy link
Member

@layershifter layershifter Mar 27, 2019

Choose a reason for hiding this comment

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

What if we will rename direction to variation/symbol and include there close?

  /** The indicator can point towards different directions. */
- direction?: 'start' | 'end' | 'top' | 'bottom'
+  variation?: 'start' | 'end' | 'top' | 'bottom' | 'close'

-   /** The indicator can point towards different directions. */
-  code?: 'arrow' | 'close'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That was my first thought but the direction is more for how the indicator/icon should be rotated. For example if you have the arrow icon, it can be pointed to different directions... In that sense what will the close mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Plus in rtl the directions for start and end are swapped...

Copy link
Member

Choose a reason for hiding this comment

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

In the same the code below doens't have any sense:

<Indicator code='close' direction='start' />

Copy link
Member

Choose a reason for hiding this comment

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

An actually, it's more clear/cross than close because it doesn't closes anything in context of usage. May be it will be more obvious if we will prefix existing values with arrow- 🤔

<Indicator symbol='cross' />
<Indicator symbol='arrow-start' />

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then back to the other proposal we had (this component was introduced only because we don't have the set of icon which will be available in all themes). Can we then define in the typings of the themes, that the arrows and close icons will always be available and just use icon names directly? If we are okay with that, then we won't even need this component at all. @kuzhelov @miroslavstastny @layershifter

Copy link
Member

Choose a reason for hiding this comment

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

Or we can define icons/symbols directly in styles of this component.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree with @miroslavstastny that this component is just covering some missing parts from our API. If we have the icons we don't need any of that.. I would rather have the icons being required as those are required by the API of the components we have...

Copy link
Collaborator

Choose a reason for hiding this comment

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

+1 for @miroslavstastny 's comment and looks like we're going towards the right solution

It'd be good to define some sort of artifacts per themes in <key,value> pairs that can be reused in components styles; same as fontAwesome does for icons; not sure if we need more than icons at this point. It'd also be good to let users edit these

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created alternative PR: #1120 please take a look

@mnajdova mnajdova changed the title WIP: feat(Indicator): add close indicator feat(Indicator): add close indicator Mar 28, 2019
@mnajdova
Copy link
Contributor Author

Closing this in favor of #1120

@mnajdova mnajdova closed this Mar 29, 2019
@layershifter layershifter deleted the feat/indicator-close branch March 29, 2019 13:20
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.

5 participants