Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

Make breadcrumbs component dumb #1257

Merged
merged 3 commits into from
Oct 17, 2017
Merged

Conversation

jonathaningram
Copy link
Contributor

This also fixes the "calling setState on an unmounted component"
warning.

Also, instead of using CSS classes to target DOM nodes in integration
tests, we use data-test attributes. We can later strip these out of
the build using a babel plugin, if desired. Note: there are other ways
of doing this, but for the time being the data-test attribute best
matches the current code with the least number of changes and is clear
enough. It's also a recommended approach by Kent C Dodds, if that holds
any weight.

@jonathaningram jonathaningram force-pushed the ji-breadcrumbs branch 2 times, most recently from 66f9b93 to 96be934 Compare October 10, 2017 21:52
import { appPropType } from '../../stores/app_store';
import { orgPropType } from '../../stores/org_store';
import { spacePropType } from '../../stores/space_store';
import Item from './breadcrumbs_item';
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's keep the name the same as what's in the imported file.
Item -> BreadcrumbsItem

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jcscottiii I was just trying to remove some stutter but I do concede that keeping BreadcrumbsItem makes searching easier (just at the expense of stutter) - but all good, I will update.

@@ -1,15 +1,16 @@

/*
Copy link
Contributor

Choose a reason for hiding this comment

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

is there a reason you got rid of this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jcscottiii I will revert - I just removed it because it didn't really tell us anything we don't already know: org_store.js is a store for org data :)

Copy link
Contributor

@jcscottiii jcscottiii left a comment

Choose a reason for hiding this comment

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

Just two things! Otherwise, LGTM. thanks for this!

This also fixes the "calling setState on an unmounted component"
warning.

Also, instead of using CSS classes to target DOM nodes in integration
tests, we use `data-test` attributes. We can later strip these out of
the build using a babel plugin, if desired. Note: there are other ways
of doing this, but for the time being the `data-test` attribute best
matches the current code with the least number of changes and is clear
enough. It's also a recommended approach by Kent C Dodds, if that holds
any weight.
@jonathaningram
Copy link
Contributor Author

Just two things! Otherwise, LGTM. thanks for this!

Thanks so much for your review - changes made, ready for review again.

@jcscottiii jcscottiii merged commit 10cee55 into cloud-gov:master Oct 17, 2017
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.

2 participants