Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Tokens component #1485

Merged
merged 17 commits into from
Feb 23, 2018
Merged

Tokens component #1485

merged 17 commits into from
Feb 23, 2018

Conversation

Blackbaud-SteveBrush
Copy link
Member

@Blackbaud-SteveBrush Blackbaud-SteveBrush commented Feb 20, 2018

The tokens component allows you to display a series of selected objects. Each token may be removed from the list with a close button or by clicking the token and pressing the escape key. More items may be added via the token stream. Tokens can be navigated with the left and right arrow keys.

View the VSTS build result: https://host.nxt.blackbaud.com/skyux2?_sp.spa=pr-tokens-component&component=SkyTokensDemoComponent

The filter component is now using the tokens: https://host.nxt.blackbaud.com/skyux2?_sp.spa=pr-tokens-component&component=SkyFilterDemoComponent

@codecov-io
Copy link

codecov-io commented Feb 21, 2018

Codecov Report

Merging #1485 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #1485    +/-   ##
=======================================
  Coverage     100%    100%            
=======================================
  Files         383     387     +4     
  Lines        7440    7596   +156     
  Branches      951     977    +26     
=======================================
+ Hits         7440    7596   +156
Impacted Files Coverage Δ
src/modules/filter/filter.module.ts 100% <100%> (ø) ⬆️
...rc/modules/filter/filter-summary-item.component.ts 100% <100%> (ø) ⬆️
src/modules/tokens/tokens.module.ts 100% <100%> (ø)
src/modules/tokens/types/tokens-message-type.ts 100% <100%> (ø)
src/modules/tokens/token.component.ts 100% <100%> (ø)
src/modules/tokens/tokens.component.ts 100% <100%> (ø)

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 9f92f25...a1ae425. Read the comment docs.

Copy link
Contributor

@blackbaud-johnly blackbaud-johnly left a comment

Choose a reason for hiding this comment

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

Docs feedback. If you are OK with the changes, I'm more than happy to make them. Please just let me know.

})
export class TokensVisualComponent {
public colors: SkyToken[] = [
{ name: 'Red' },
Copy link
Contributor

Choose a reason for hiding this comment

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

Just out of curiosity, why is red the only color that is not in alphabetical order? (It's the same in another file below.)

</h3>

<p>
These tokens may be navigated with the arrow keys, and dismissed by either clicking the close button on each token, or pressing the backspace key.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd tweak this to: "These tokens can be navigated with the arrow keys, and they can be dismissed with the close buttons or the backspace key."

</h3>

<p>
These tokens cannot be dismissed. However, they may still be navigated using the arrow keys.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd change this to: "These tokens cannot be dismissed, but they can still be navigated with the arrow keys."

</h3>

<p>
These tokens define a custom property to display their value, and emit an event when a token is selected.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd split this into 2 sentences: "These tokens define a custom property to display their values. When users select a token, it emits an event."

<p>
<button
(click)="focusLastToken()">
Focus last token
Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't served this up, so maybe it's clearer in context. But just looking at the code, I don't follow what this label means. Should there be an "on" between "Focus" and "last"?

@@ -819,6 +819,10 @@
"_description": "The close button for the timepicker modal",
"message": "Done"
},
"token_dismiss_button_title": {
"_description": "The default text for the token dismiss button title.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably doesn't matter too much, but "token dismiss button title" is a mouthful. I try to avoid long streams like this of nouns/verbs used as adjectives because it's hard to tell which words are modifiers and which word is being modified. I'd change "token dismiss button title" to "title of the button that dismisses tokens."

Copy link
Member Author

Choose a reason for hiding this comment

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

This is more of an identifier than anything, and I believe the convention is to prefix the slug with the name of the module (can be read as: "Token > Dismiss button > Title").

Copy link
Contributor

Choose a reason for hiding this comment

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

OK. Sorry about that.

@Blackbaud-SteveBrush Blackbaud-SteveBrush merged commit 6511337 into master Feb 23, 2018
@Blackbaud-SteveBrush Blackbaud-SteveBrush deleted the tokens-component branch February 23, 2018 15:59
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