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

Refactor product selection dialogs #3499

Merged
merged 17 commits into from Jan 7, 2019

Conversation

dominik-zeglen
Copy link
Contributor

Resolves #3487

Pull Request Checklist

  1. Privileged views and APIs are guarded by proper permission checks.
  2. All visible strings are translated with proper context.
  3. All data-formatting is locale-aware (dates, numbers, and so on).
  4. Database queries are optimized and the number of queries is constant.
  5. Database migration files are up to date.
  6. The changes are tested.
  7. The code is documented (docstrings, project documentation).
  8. GraphQL schema and type definitions are up to date.
  9. Changes are mentioned in the changelog.

@codecov
Copy link

codecov bot commented Dec 20, 2018

Codecov Report

Merging #3499 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3499   +/-   ##
=======================================
  Coverage   89.89%   89.89%           
=======================================
  Files         241      241           
  Lines       13109    13109           
  Branches     1323     1323           
=======================================
  Hits        11784    11784           
  Misses        921      921           
  Partials      404      404

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 989d5fb...78ee698. Read the comment docs.

@codecov
Copy link

codecov bot commented Dec 20, 2018

Codecov Report

Merging #3499 into master will decrease coverage by <.01%.
The diff coverage is 90.32%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3499      +/-   ##
==========================================
- Coverage   89.84%   89.83%   -0.01%     
==========================================
  Files         250      250              
  Lines       13213    13217       +4     
  Branches     1337     1338       +1     
==========================================
+ Hits        11871    11874       +3     
  Misses        930      930              
- Partials      412      413       +1
Impacted Files Coverage Δ
saleor/checkout/models.py 98.76% <100%> (ø) ⬆️
saleor/graphql/order/schema.py 100% <100%> (ø) ⬆️
saleor/page/models.py 92% <100%> (ø) ⬆️
saleor/menu/models.py 84.37% <100%> (ø) ⬆️
saleor/payment/models.py 97.32% <100%> (ø) ⬆️
saleor/order/models.py 90.43% <100%> (ø) ⬆️
saleor/graphql/product/types.py 97.11% <100%> (+0.01%) ⬆️
saleor/product/models.py 93.11% <100%> (+0.02%) ⬆️
saleor/graphql/order/mutations/draft_orders.py 92.48% <84.21%> (-0.41%) ⬇️

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 5e45dfc...5a5df06. Read the comment docs.

@maarcingebala
Copy link
Member

Worth sharing a screenshot of how our new and fancy product selection looks like:
image

@maarcingebala
Copy link
Member

I've tested it and it looks and works great! One change that I'd suggest is to render a short message if no products were found.

image

@selvara80
Copy link

selvara80 commented Dec 21, 2018 via email

@dominik-zeglen dominik-zeglen force-pushed the refactor-product-selection-dialogs branch from 4d8a1cd to 2aca4cc Compare January 4, 2019 09:14
)}
</TableBody>
</Table>
</InfiniteScroll>
Copy link
Contributor

Choose a reason for hiding this comment

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

You should really think about some code organizing. It's extremally hard to read IMO.
ruciax1

Copy link
Member

Choose a reason for hiding this comment

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

True, for instances there are two large onChange handlers for checkboxes, shouldn't these be extracted to some functions for better readability?

Copy link
Contributor

Choose a reason for hiding this comment

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

You could extract functions etc to the top to make .jsx a lot clearer.

@dominik-zeglen dominik-zeglen force-pushed the refactor-product-selection-dialogs branch from db61954 to 0d468a4 Compare January 7, 2019 13:17
@dominik-zeglen dominik-zeglen force-pushed the refactor-product-selection-dialogs branch from d6d5aeb to 5a5df06 Compare January 7, 2019 15:33
@maarcingebala maarcingebala merged commit 95182d4 into master Jan 7, 2019
@maarcingebala maarcingebala deleted the refactor-product-selection-dialogs branch January 7, 2019 15:48
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.

None yet

4 participants