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

Data entry lookup #1220

Conversation

Blackbaud-TomRamsey
Copy link
Contributor

@blackbaud-sky-savage
Copy link
Collaborator

Tests failed. Automated cross-browser testing via BrowserStack and Travis CI shows that the JavaScript changes in this pull request are: BUSTED

Commit: bc8fb5e
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/289492280

(Please note that this is a fully automated comment.)

@blackbaud-sky-savage
Copy link
Collaborator

Tests failed. Automated cross-browser testing via BrowserStack and Travis CI shows that the JavaScript changes in this pull request are: BUSTED

Commit: 5dcd3cd
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/289493446

(Please note that this is a fully automated comment.)

@blackbaud-sky-savage
Copy link
Collaborator

Tests failed. Automated cross-browser testing via BrowserStack and Travis CI shows that the JavaScript changes in this pull request are: BUSTED

Commit: 6b39a13
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/289498626

(Please note that this is a fully automated comment.)

@codecov-io
Copy link

codecov-io commented Oct 18, 2017

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #1220    +/-   ##
=======================================
  Coverage     100%    100%            
=======================================
  Files         370     372     +2     
  Lines        6796    7046   +250     
  Branches      874     938    +64     
=======================================
+ Hits         6796    7046   +250
Impacted Files Coverage Δ
.../list-filters/list-filter-inline-item.component.ts 100% <ø> (ø) ⬆️
...modules/text-highlight/text-highlight.directive.ts 100% <100%> (ø) ⬆️
src/modules/lookup/lookup.module.ts 100% <100%> (ø)
src/modules/lookup/lookup.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 e6ba56c...238ffcb. Read the comment docs.

@blackbaud-sky-savage
Copy link
Collaborator

Tests passed. Automated cross-browser testing via BrowserStack and Travis CI shows that the JavaScript changes in this pull request are: CONFIRMED

Commit: 07b61c2
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/289523795

(Please note that this is a fully automated comment.)

font-style: italic;
}

.sky-lookup-selected-item {
Copy link
Contributor

Choose a reason for hiding this comment

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

Selected items in multiselect mode should be styled the same as selected filter summary items https://github.com/blackbaud/skyux2/blob/master/src/modules/filter/filter-summary-item.component.scss


.sky-lookup-menu-item {
@include sky-dropdown-item();
&.sky-lookup-menu-item-focused {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should use the regular dropdown item styling for focus, which just uses the browser default

Copy link
Contributor Author

Choose a reason for hiding this comment

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

With this control, focus as nuanced meaning:

  1. There is the concept of an 'active item' which represents the current item which will be selected (if you hit enter or leave for auto-complete). You can change this item by using the up and down arrows.

  2. If you attempt to move focus out of the control, it will collapse the menu and resolve the pending text. This means you can't give the menu focus.

  3. If you hover, you will get standard dropdown styling.

We need to differentiate between active item and hover visually for usability. I'm going to rename the css class from sky-lookup-menu-item-focus to sky-lookup-menu-item-active to make it more clear.

Copy link
Contributor

Choose a reason for hiding this comment

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

To differentiate the active item, the best analogue we currently have is on the Sort component, which uses background $sky-background-color-selected and the $sky-emphasized font styling. I think that would work here, the background color is quite close to the hover gray but the bold/larger text will make it stand out.

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 would caution against altering the font weight on active item because we allow consumers of the control to template the menu contents. A likely scenario would be for two lines of content, where the second line was diminished or otherwise styled.

Copy link
Contributor

Choose a reason for hiding this comment

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

What options do they have for styling on the templates?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The consumer of the component can pass a template for menu items, which essentially allows them to do anything within the confines of the menu item. Multiple lines, include images or icons, format data, etc.

@blackbaud-sky-savage
Copy link
Collaborator

Tests passed. Automated cross-browser testing via BrowserStack and Travis CI shows that the JavaScript changes in this pull request are: CONFIRMED

Commit: 08e830d
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/305321709

(Please note that this is a fully automated comment.)

@blackbaud-sky-savage
Copy link
Collaborator

Tests passed. Automated cross-browser testing via BrowserStack and Travis CI shows that the JavaScript changes in this pull request are: CONFIRMED

Commit: f95ba0c
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/305340363

(Please note that this is a fully automated comment.)

@Blackbaud-ToddRoberts
Copy link
Contributor

The approved design specifies the double-backspace to delete the last item in the list, which has the benefit of specifically calling out which item will be removed and avoids accidental removals.

It also specifies that delete/backspace be used to delete the focused items. There are a couple of risks in having Enter remove the item:

  1. the focused applied item bubble in Filter opens the filter modal on Enter (it's deleted on Enter if the X is focused)
  2. Angular UI Select (which this component basically replicates) does not remove items on Enter and our users may be used to that functionality from its days in UX1 (and still implemented in products).

I do have concerns about discoverability of using backspace/delete here but am inclined to go with the design as approved, and update it later if we hear that it's problematic. There is a version of this in the K12 products and users have figured out the Delete button without much issue.

@blackbaud-sky-savage
Copy link
Collaborator

Tests failed. Automated cross-browser testing via BrowserStack and Travis CI shows that the JavaScript changes in this pull request are: BUSTED

Commit: 44cf1a2
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/308113968

(Please note that this is a fully automated comment.)

@@ -0,0 +1,73 @@
<div (document:click)="windowClick()">

Choose a reason for hiding this comment

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

The preference is to have as much logic included in the component class as possible. We should use a @HostListener('document:click') in the class, instead.

For example: https://stackoverflow.com/questions/40107008/hostlistener-documentclick-angular-2-same-component

</span>
</div>
</div>
<div class="sky-dropdown-menu">

Choose a reason for hiding this comment

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

Did you already try inserting the <sky-dropdown> component in here, instead of injecting its adapter service? If so, what challenges did you encounter? I wrote a dumbed-down version of what I'm talking about in the lookup-adjustments branch: https://github.com/blackbaud/skyux2/blob/lookup-adjustments/src/modules/lookup/lookup.component.html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When I started the component I asked the same question. I ended up not using the entire dropdown component directly because the overhead didn't add anything beyond more layers to deal with. If we went down that road I'd make the argument that the menu should be a distinct reusable component separate from the dropdown. The adapters exist as separate services and utilities so they can be reused (and obviously tested) independently of the core component they exist for, so it really becomes a philosophical question as to where you draw the dependency. As constructed today,, there is nothing which should prevent this from changing in the future without impacting public backwards compatibility.

<div class="sky-dropdown-menu">
<div *ngFor="let item of results" class="sky-lookup-menu-item"
[ngClass]="{'sky-lookup-menu-item-active': (item === activeMenuItem)}">
<button type="button"

Choose a reason for hiding this comment

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

For accessibility, we need to include the aria-activedescendant attribute when selecting individual items, much like Angular Material's autocomplete: https://material.angular.io/components/autocomplete/overview#accessibility

Copy link
Contributor Author

Choose a reason for hiding this comment

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

aria-activedescendant is a really interesting question. According to the documentation, it should be set to the id of the item in the list selected - but the primary purpose of that is when it doesn't otherwise match the contents of the button. In our case, they will be the same. We don't use ids to track items, so a best I would just put the string of the innerHtml which would seem to be unhelpful.

this.closeMenu();
}

public keydown(event: KeyboardEvent) {

Choose a reason for hiding this comment

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

There are discussions internally about whether this keyboard behavior should be "fixed" in the Dropdown Module (using the arrow keys, etc.). I'll get back to you on this ASAP.

@blackbaud-sky-savage
Copy link
Collaborator

Tests failed. Automated cross-browser testing via BrowserStack and Travis CI shows that the JavaScript changes in this pull request are: BUSTED

Commit: ac0b448
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/310270865

(Please note that this is a fully automated comment.)

@blackbaud-sky-savage
Copy link
Collaborator

Tests failed. Automated cross-browser testing via BrowserStack and Travis CI shows that the JavaScript changes in this pull request are: BUSTED

Commit: 5ffd20f
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/311872239

(Please note that this is a fully automated comment.)

@blackbaud-sky-savage
Copy link
Collaborator

Tests failed. Automated cross-browser testing via BrowserStack and Travis CI shows that the JavaScript changes in this pull request are: BUSTED

Commit: 4fb0c2b
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/312479006

(Please note that this is a fully automated comment.)

@blackbaud-sky-savage
Copy link
Collaborator

Tests failed. Automated cross-browser testing via BrowserStack and Travis CI shows that the JavaScript changes in this pull request are: BUSTED

Commit: 94ff254
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/313037283

(Please note that this is a fully automated comment.)

@blackbaud-sky-savage
Copy link
Collaborator

Tests failed. Automated cross-browser testing via BrowserStack and Travis CI shows that the JavaScript changes in this pull request are: BUSTED

Commit: fa58206
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/315017787

(Please note that this is a fully automated comment.)

@blackbaud-sky-savage
Copy link
Collaborator

Tests failed. Automated cross-browser testing via BrowserStack and Travis CI shows that the JavaScript changes in this pull request are: BUSTED

Commit: c39dd83
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/316102896

(Please note that this is a fully automated comment.)

@blackbaud-sky-savage
Copy link
Collaborator

Tests failed. Automated cross-browser testing via BrowserStack and Travis CI shows that the JavaScript changes in this pull request are: BUSTED

Commit: 238ffcb
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/317069700

(Please note that this is a fully automated comment.)

@Blackbaud-SteveBrush
Copy link
Member

Blackbaud-SteveBrush commented Dec 20, 2017

Closing this in favor of a three-part contribution:

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