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

[Mobile] Cart Dropdown #5480

Merged

Conversation

Matt-Yorkley
Copy link
Contributor

@Matt-Yorkley Matt-Yorkley commented May 21, 2020

What? Why?

Closes #4704
Closes #2718
Closes #4705
Closes #2706

What should we test?

Everything in the cart dropdown epic.

Release notes

Updated UX on cart dropdown for all devices.

@Matt-Yorkley Matt-Yorkley self-assigned this May 21, 2020
@Matt-Yorkley Matt-Yorkley force-pushed the mobile-cart-restyle branch 4 times, most recently from a828110 to 1338e7a Compare May 23, 2020 12:08
@Matt-Yorkley Matt-Yorkley added pr-staged-au staging.openfoodnetwork.org.au and removed pr-staged-au staging.openfoodnetwork.org.au labels May 28, 2020
@Matt-Yorkley Matt-Yorkley force-pushed the mobile-cart-restyle branch 4 times, most recently from 5a073a2 to 5ecce2a Compare May 29, 2020 21:36
@Matt-Yorkley Matt-Yorkley marked this pull request as ready for review May 29, 2020 21:37
@Matt-Yorkley Matt-Yorkley force-pushed the mobile-cart-restyle branch from 5ecce2a to b5ab345 Compare May 29, 2020 21:41
@luisramos0
Copy link
Contributor

Awesome, I will review soon. Do you plan to fix any of the codeclimate issues? Like the single quotes ones?
Maybe we need to disable some of the rules? Like the ordering of elements?

@Matt-Yorkley
Copy link
Contributor Author

Matt-Yorkley commented May 30, 2020

I fixed a number of them. I'll have another look and assess some rules.

Most of these linting issues were due to moving existing CSS rules from one file into two clearer files. 🙈

@Matt-Yorkley Matt-Yorkley force-pushed the mobile-cart-restyle branch from b5ab345 to 4aac042 Compare May 30, 2020 12:43
@Matt-Yorkley
Copy link
Contributor Author

Matt-Yorkley commented May 30, 2020

I've fixed some more linting issues, and disabled two rules:

Screenshot from 2020-05-30 14-40-13

We use double-quoted strings all over the place, and we've decided in the rest of the codebase to prefer double-quoted strings (and disable the same rule in rubocop).

Screenshot from 2020-05-30 14-44-06

This rule is only triggered because we extracted breakpoint declarations into a mixin, which I think is an improvement. It would be a total mess if we actually tried to follow this rule everywhere we use breakpoints...

Copy link
Contributor

@luisramos0 luisramos0 left a comment

Choose a reason for hiding this comment

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

Great work Matt. A lot of work in this PR 💪

Just one major point about Cart.finalized_line_items.

.codeclimate.yml Show resolved Hide resolved
app/assets/stylesheets/darkswarm/cart-page.css.scss Outdated Show resolved Hide resolved
app/assets/stylesheets/darkswarm/shop.css.scss Outdated Show resolved Hide resolved
app/assets/stylesheets/darkswarm/shop.css.scss Outdated Show resolved Hide resolved
app/serializers/api/variant_serializer.rb Outdated Show resolved Hide resolved
config/locales/en.yml Show resolved Hide resolved
app/views/shared/menu/_cart_sidebar.html.haml Show resolved Hide resolved
@luisramos0
Copy link
Contributor

please don't force-push 🙏

Copy link
Contributor

@luisramos0 luisramos0 left a comment

Choose a reason for hiding this comment

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

Impecável, my new approval word :-)

app/assets/stylesheets/darkswarm/cart-dropdown.css.scss Outdated Show resolved Hide resolved
%img{'ng-src' => '{{ line_item.variant.thumb_url }}'}
%td
%span {{ line_item.variant.extended_name }}
%br
Copy link
Contributor

Choose a reason for hiding this comment

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

why don't we use a block element instead of a span so there's no need for a br? the need for it clearly shows the span doesn't fit the needs.

@Matt-Yorkley Matt-Yorkley requested a review from sauloperez June 4, 2020 09:02
@Matt-Yorkley
Copy link
Contributor Author

@sauloperez I removed some of the indentation changes. It's probably best not to touch any of that CSS in this PR as I think Maikel will be changing it a lot in other open PRs, and it wasn't strictly necessary or relevant here. All the above comments are now outdated / not relevant.

@daniellemoorhead daniellemoorhead self-assigned this Jun 9, 2020
The CTA breaks the layout when the new cart sidebar is open. I can't see a nice way to keep it at the top without making a mess.
This was mistakenly changed to use a max-width breakpoint in a previous commit.
…n /app/assets/images folder

This seems to be needed for Rails 4
@Matt-Yorkley Matt-Yorkley force-pushed the mobile-cart-restyle branch from 7e4b8e0 to 1511551 Compare June 18, 2020 20:22
@Matt-Yorkley
Copy link
Contributor Author

Rebased to resolve conflicts.

@daniellemoorhead
Copy link
Contributor

Conflicts don't seem to be resolved, semaphore still failed. Deploying anyway.

@daniellemoorhead
Copy link
Contributor

Ok, so, the take me shopping button is now displaying when you've visited as shop and then go back to the /shops page. However, it's also showing up on desktop/tablet, which it isn't supposed to do.

@yukoosawa this is something to consider when you do your final design sweep on the cart experience.

@Matt-Yorkley, go ahead and resolve the conflicts and then merge.

Shows "Take me shopping!" button on /shops page if a shop is selected
@Matt-Yorkley Matt-Yorkley force-pushed the mobile-cart-restyle branch from 1511551 to b189d06 Compare June 19, 2020 07:01
@Matt-Yorkley Matt-Yorkley merged commit be4a4c4 into openfoodfoundation:master Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants