Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Search and Pagination on Assets Page & Edit Image Modal #249

Merged
merged 4 commits into from
Sep 28, 2018

Conversation

matthugs
Copy link
Contributor

@matthugs matthugs commented Sep 12, 2018

This updates the search and pagination components on the assets page (which are shared with the modal used to choose an image for an HTML unit) to use the paragon components provided for this purpose. Consistency!

@matthugs matthugs changed the title [wip]: Update Search and Pagination on Assets Page & Edit Image Modal to Update Search and Pagination on Assets Page & Edit Image Modal Sep 14, 2018
Copy link
Contributor

@fysheets fysheets left a comment

Choose a reason for hiding this comment

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

Overall I think this looks good -- I left some questions around things that I wanted to understand more clearly. I'm going to wait on the 👍until you squash and merge and it goes green.

src/components/AssetsSearch/index.jsx Show resolved Hide resolved
src/components/AssetsSearch/index.jsx Show resolved Hide resolved
@@ -29,3 +28,6 @@
@extend .disabled;
}
}
.page-item.disabled .page-link {
background-color: transparent;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you share the context on why this CSS change was needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes; it's to override some CSS for making all the list items look similar. The disabled list items in this context are the ellipses representing ranges of pages not visible. The design of the paragon component is that those elements shouldn't have a distinct background color, and should blend in with the surrounding background color.

With that said I am quite bad at CSS/SCSS; is this the use-case for a SCSS variable override? It def looks like I could've put it above in the .disabled { ... .page-link { <here> } } above and achieved the same degree of specificity. I'll try that out for my next push.

src/components/Pagination/index.jsx Show resolved Hide resolved
src/data/actions/assets.js Show resolved Hide resolved
@matthugs matthugs force-pushed the mhughes/assets-page-paragon-search branch from 4d1dfdc to ac082fa Compare September 17, 2018 18:52
@fysheets
Copy link
Contributor

Resolved conversations - thanks for the clarity. Two quick follow ups - please rebase on top of the latest master changes and a quick clarification on what the refactor commit message will do for version numbers.

@matthugs matthugs force-pushed the mhughes/assets-page-paragon-search branch 2 times, most recently from 98be309 to 74b02e6 Compare September 18, 2018 15:50
@matthugs
Copy link
Contributor Author

Resolved conversations - thanks for the clarity. Two quick follow ups - please rebase on top of the latest master changes and a quick clarification on what the refactor commit message will do for version numbers.

Good catch, @fysheets!

package.json Outdated
@@ -15,7 +15,7 @@
"license": "AGPL-3.0",
"dependencies": {
"@edx/edx-bootstrap": "^1.0.0",
"@edx/paragon": "3.1.2",
"@edx/paragon": "3.4.7",
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 do have one final detail to follow-up on this PR which relates to some propType errors I expected, but didn't see. They were stemming from changes in edx/paragon I thought were necessary, but which we also ran into trouble trying to test locally. Following up on that in just a little bit! (It seems like the proptype validations went away when I bumped the paragon version, but my understanding was that I should still expect them even if we were up-to-date with @edx/paragon's master...

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 looks like proptype validations aren't running against paragon components in the new version we're upgrading into. FYI @fysheets, since this may be a larger issue. We may have a number of proptype issues masked by this issue.

I haven't dug in super far, but I expect this may also be the result of how we use post-build paragon code from within studio-frontend.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We're moving forward from this with a bumped paragon version, which should suffice to eliminate any proptype validation errors.

@matthugs matthugs force-pushed the mhughes/assets-page-paragon-search branch from 74b02e6 to c96e48d Compare September 19, 2018 20:53
@codecov
Copy link

codecov bot commented Sep 19, 2018

Codecov Report

Merging #249 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #249      +/-   ##
==========================================
- Coverage   99.16%   99.15%   -0.01%     
==========================================
  Files          71       71              
  Lines        1312     1298      -14     
  Branches      222      220       -2     
==========================================
- Hits         1301     1287      -14     
  Misses         11       11
Impacted Files Coverage Δ
src/components/Pagination/displayMessages.jsx 100% <ø> (ø) ⬆️
src/data/actions/assets.js 100% <ø> (ø) ⬆️
src/data/constants/actionTypes.js 100% <ø> (ø) ⬆️
src/data/reducers/assets.js 98.78% <ø> (-0.02%) ⬇️
src/components/AssetsSearch/displayMessages.jsx 100% <ø> (ø) ⬆️
src/components/AssetsSearch/index.jsx 100% <100%> (ø) ⬆️
src/components/Pagination/index.jsx 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 378219f...527bb5a. Read the comment docs.

Copy link
Contributor

@fysheets fysheets left a comment

Choose a reason for hiding this comment

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

After running through this change locally - as we discussed, please add an action handler to the x / Clear Search button that appears once a search term is entered. Also, please rebase on top of master at some point. Thanks!

@matthugs matthugs force-pushed the mhughes/assets-page-paragon-search branch 2 times, most recently from 52c73aa to 3b54504 Compare September 25, 2018 13:39
Matt Hughes and others added 2 commits September 25, 2018 09:54
This exposes a port for node debugging in our docker container
configuration, and documents how to make use of it in the README
docs(testDebugging): Document debugging tests within container
@matthugs matthugs force-pushed the mhughes/assets-page-paragon-search branch 2 times, most recently from 2e6d2bb to 25baa9d Compare September 25, 2018 15:41
@openedx openedx deleted a comment from TravisBuddy Sep 25, 2018
@openedx openedx deleted a comment from TravisBuddy Sep 25, 2018
@openedx openedx deleted a comment from TravisBuddy Sep 25, 2018
@openedx openedx deleted a comment from TravisBuddy Sep 25, 2018
@openedx openedx deleted a comment from TravisBuddy Sep 25, 2018
@openedx openedx deleted a comment from TravisBuddy Sep 25, 2018
@openedx openedx deleted a comment from TravisBuddy Sep 25, 2018
@openedx openedx deleted a comment from TravisBuddy Sep 25, 2018
@openedx openedx deleted a comment from TravisBuddy Sep 25, 2018
@openedx openedx deleted a comment from TravisBuddy Sep 25, 2018
@openedx openedx deleted a comment from TravisBuddy Sep 25, 2018
@openedx openedx deleted a comment from TravisBuddy Sep 25, 2018
@openedx openedx deleted a comment from TravisBuddy Sep 25, 2018
@TravisBuddy
Copy link

Continuous Integration Results

✅ Everything passed, go ahead and merge this once you're ready

@fysheets
Copy link
Contributor

Sorry for the back and forth here - Thanks for updating that logic it looks awesome! I was running through it and Michael noticed that the CSS didn't quite match up to what may have been expected. We can sync up on that in person to determine the best course of action there. (Timebox to try to fix in this PR or a follow on task)

@matthugs
Copy link
Contributor Author

Sorry for the back and forth here - Thanks for updating that logic it looks awesome! I was running through it and Michael noticed that the CSS didn't quite match up to what may have been expected. We can sync up on that in person to determine the best course of action there. (Timebox to try to fix in this PR or a follow on task)

No worries re:back-and-forth @fysheets and @MichaelRoytman! Happy to have close eyes on my first substantive changes

@matthugs matthugs force-pushed the mhughes/assets-page-paragon-search branch from 25baa9d to 6c8ac43 Compare September 27, 2018 15:12
@TravisBuddy
Copy link

Continuous Integration Results

✅ Everything passed, go ahead and merge this once you're ready

@matthugs matthugs force-pushed the mhughes/assets-page-paragon-search branch from 6c8ac43 to 50031ce Compare September 27, 2018 19:42
@TravisBuddy
Copy link

Continuous Integration Results

✅ Everything passed, go ahead and merge this once you're ready

Copy link
Contributor

@fysheets fysheets left a comment

Choose a reason for hiding this comment

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

Thanks for tackling this even when it turned out to be a bigger task than anticipated!

Thumbing with the caveat of whatever the last scss decision ends up being within the team.

MichaelRoytman and others added 2 commits September 28, 2018 15:20
Paragon's `Pagination` and `SearchField` components are now used for
the Assets page and the parallel Add Image Modal. This involves some
visual changes, and a difference in the number of pages ellided in the
navigation bar.

`perf` in the title here is used to force a new patch version, but
`refactor` would likely be more descriptive.

fixes EDUCATOR-3421
@matthugs matthugs force-pushed the mhughes/assets-page-paragon-search branch from 50031ce to 527bb5a Compare September 28, 2018 19:27
@TravisBuddy
Copy link

Continuous Integration Results

✅ Everything passed, go ahead and merge this once you're ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants