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

Added SkyLinkRecordsComponent #1036

Merged

Conversation

blackbaud-joshgerdes
Copy link
Contributor

Contributing record linking component as defined in #726

@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: 5847fae
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/270521037

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

@codecov-io
Copy link

codecov-io commented Aug 31, 2017

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #1036    +/-   ##
=======================================
  Coverage     100%    100%            
=======================================
  Files         317     351    +34     
  Lines        5983    6477   +494     
  Branches      760     838    +78     
=======================================
+ Hits         5983    6477   +494
Impacted Files Coverage Δ
...link-records/state/results/results.orchestrator.ts 100% <100%> (ø)
...link-records/state/selected/set-selected.action.ts 100% <100%> (ø)
...s/link-records/state/link-records-state.rxstate.ts 100% <100%> (ø)
.../link-records/link-records-item-title.component.ts 100% <100%> (ø)
src/modules/link-records/state/fields/actions.ts 100% <100%> (ø)
src/modules/list/list.component.ts 100% <100%> (ø) ⬆️
...c/modules/link-records/state/fields/field.model.ts 100% <100%> (ø)
...s/link-records/state/fields/fields.orchestrator.ts 100% <100%> (ø)
...es/link-records/state/matches/set-status.action.ts 100% <100%> (ø)
src/modules/link-records/link-records.component.ts 100% <100%> (ø)
... and 60 more

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 b2978f7...7ec0f85. Read the comment docs.

@Blackbaud-SteveBrush Blackbaud-SteveBrush self-assigned this Aug 31, 2017
@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: e7242ac
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/270565886

(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: b28e226
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/272105282

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

Copy link
Contributor

@Blackbaud-ToddRoberts Blackbaud-ToddRoberts left a comment

Choose a reason for hiding this comment

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

To ensure consistency across components styling should reference mixins and variables to the extent possible.
Text styling should reference the typography mixins or classes.
Borders should reference the border mixin https://github.com/blackbaud/skyux-design-tokens/blob/master/src/scss/mixins.scss
Colors should reference the variables documented here https://developer.blackbaud.com/skyux2/design/color rather than referencing the numeric values, e.g. $sky-highlight-color-success instead of $sky-color-green-50

@blackbaud-joshgerdes
Copy link
Contributor Author

@Blackbaud-ToddRoberts thanks for the review. The design updates were not complete when we originally created this control. And the variables were missing from the skyux-design-tokens repo so I was unable to update our contrib repo where this control currently resides. I did a quick pass when creating this PR but I will run through it again to update some more of the styles.

In general, is the skyux-design-tokens repo stable/up-to-date? It seems to be missing the variables.scss file and the mixins.scss has only one mixin in it? We would like to update our contrib repo with that latest stylings at some point (without having to copy over scss on every skyux update) and was hoping to leverage the scss in that repo. What are the skyux team's overall goals for that repo?

@Blackbaud-ToddRoberts
Copy link
Contributor

Blackbaud-ToddRoberts commented Sep 6, 2017

@Blackbaud-BobbyEarl can you answer the question about the design-tokens repo? I am not sure where the variables are at.

@blackbaud-joshgerdes
Copy link
Contributor Author

@Blackbaud-ToddRoberts Updated. For the typography, we are currently using the new font families but the we would need direction from UX ( @Blackbaud-MattVaccaro ) to determine what classes they would want to switch/update the control elements to. Right now the typography has already been approved by him.

@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: 7299d13
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/272516971

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

@Blackbaud-ToddRoberts
Copy link
Contributor

Blackbaud-ToddRoberts commented Sep 6, 2017

@blackbaud-joshgerdes The ultimate intent of the design tokens repo is to provide a single source of truth for core styling elements, consumable by products regardless of platform. In general we want styling to be handled automatically by components and SkyUX-provided CSS classes, but we know there are some cases where that isn't optimal or feasible. The design token variable and mixin files provide the styles we want to expose for consumption in apps in addition to the SkyUX CSS classes; we will likely add to these in the future. When building a component, the SkyUX mixin and variables files can be used as well. @Blackbaud-PaulCrowder please correct any misstatements in there ;)

@Blackbaud-BobbyEarl
Copy link

The skyux-design-tokens repo is the source. Many of the assets, such as variables.scss are created during the build step before it's published to NPM. If you look at a consuming project, say skyux2, you'll see all the necessary files available for reference.

@Blackbaud-SteveBrush Blackbaud-SteveBrush removed their assignment Sep 6, 2017
@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: b4396a3
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/272732449

(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: 3a4ab76
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/272894152

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

@blackbaud-joshgerdes
Copy link
Contributor Author

@Blackbaud-ToddRoberts did you get a chance to review the updates. Anything else you need me to update on this PR?

@Blackbaud-ToddRoberts
Copy link
Contributor

@blackbaud-joshgerdes I am looking at it now, in the demo it looks like some styles are being overwritten by Stache styles so I'm trying to ensure it looks right outside of a Stache environment.

@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: 1ae8572
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/273096820

(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: b4f1a37
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/273295131

(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: 5d32d1d
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/274292476

(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: d656abe
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/276875526

(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: 9986ae9
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/276942272

(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: 249b341
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/276954220

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

@Blackbaud-SteveBrush
Copy link
Member

@blackbaud-joshgerdes Here is my initial feedback. Thanks for putting this together!

  1. Provide a prefix for the STATUSES variable (for example, SKY_LINK_RECORDS_STATUSES), since it could potentially be imported in another module. If the intention is that it should not be used by another module, you could remove the export in the index.ts file.
  2. Add entries for any English labels or descriptions to the resources_en_US.json file.
  3. The HTML template for link-records-item.component.html file is fairly complex and the logic is difficult to read. Is there any possible way we could replace some (if not all) of the *ngIf statements with calls to component methods? Ideally, the STATUSES wouldn't be exposed in the template, and the logic would be contained in the class. For example:
<div *ngIf="record.status == STATUSES.Suggested || record.status == STATUSES.Selected">

// Convert to...

<div *ngIf="isPossibleMatch(record)"> // (or something similar)

) {}

public ngOnInit() {
if (this.items && !(this.items instanceof Observable)) {

Choose a reason for hiding this comment

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

For these if blocks: what's the use case for checking if the input is of type observable? It seems that we should enforce one type or the other (ie. the consumer should always provide an observable, here.). Just curious if you have any insights...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It allows the user to provide an observable or regular array for the values. This is how we implemented similar properties when we created the sky list and its views as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As for the above:

  1. Will update to SKY_LINK_RECORDS_STATUSES
  2. Not explicitly part of the contribution guidelines but we will update
  3. I actually think the logic is more readable because it is in place in the file. Most of the if logic is just around a single state anyway. I could see moving a couple if statements to functions but don't really see a huge gain by doing so. The logic for the link record items just inherently has some complexity to it.

Copy link
Member

@Blackbaud-SteveBrush Blackbaud-SteveBrush Sep 19, 2017

Choose a reason for hiding this comment

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

I'll add an issue to update the contribution guidelines, based on your feedback for #2. (#1082)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good, made the other requested updates. Tests passed and just awaiting review.

@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: d8dc590
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/277338093

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

@blackbaud-joshgerdes blackbaud-joshgerdes force-pushed the link-records branch 2 times, most recently from 2737d3c to 69c58e1 Compare September 19, 2017 15:16
@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: 2737d3c
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/277350458

(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: 69c58e1
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/277359565

(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: 6eb9c43
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/277417872

(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: f276afb
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/277478348

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

@Blackbaud-SteveBrush
Copy link
Member

@blackbaud-joshgerdes Thanks for taking care of those updates! Most of this looks good to me.

Something I noticed: some of the TypeScript classes do not have a prefix of Sky. I realize that some of the already-approved List stuff do not have this prefix (for example: https://github.com/blackbaud/skyux2/blob/master/src/modules/list/index.ts), and those should have been caught before being merged. We can't fix those, but it would be ideal if all new components, directives, and providers had the Sky prefix.

Some examples I saw in this branch: LinkRecordsApi, LinkRecordsItemModel, LinkRecordsState, LinkRecordsStateDispatcher, etc.

Thank you!

@blackbaud-joshgerdes
Copy link
Contributor Author

blackbaud-joshgerdes commented Sep 19, 2017

Those are all internal to the component and should not be directly referenced. That is why they do not have the prefix. Do you really still need them to have it?

@Blackbaud-SteveBrush

@Blackbaud-SteveBrush
Copy link
Member

@blackbaud-joshgerdes Yes, please.

The idea we're shooting for is that any contributor working with our classes would know at first-glance that they are owned by SKY, and not a third-party library. Also, it prevents class-name clashes with other libraries, if it ever came to that. (Let me know if you want some assistance with this, as I know it's no small task.)

It's also regrettable that this requirement is not described in the Contribution Guidelines; I've created an issue to amend this for the future: #1093.

@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: 4b8167a
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/277962624

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

@blackbaud-joshgerdes
Copy link
Contributor Author

@Blackbaud-SteveBrush Updated

@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: 7ec0f85
Build details: https://travis-ci.org/blackbaud-sky-savage/skyux2/builds/278281585

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

Copy link
Member

@Blackbaud-SteveBrush Blackbaud-SteveBrush left a comment

Choose a reason for hiding this comment

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

LGTM

@Blackbaud-SteveBrush Blackbaud-SteveBrush merged commit b7de5e2 into blackbaud:master Sep 21, 2017
@blackbaud-joshgerdes blackbaud-joshgerdes deleted the link-records branch October 6, 2017 20:01
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.

6 participants