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

Add alt text to Product thumbnail and background_image of Collection and Category #3429

Merged
merged 12 commits into from Dec 14, 2018

Conversation

fowczarek
Copy link
Member

@fowczarek fowczarek commented Dec 11, 2018

I want to merge this change because resolve #3257

To do:

  • Add alt' text filed in the Image` type
  • Add background_image_alt to Collection model
  • Expose background_image_alt to Collection in API
  • Handle background_image_alt of Collection in dashboard
  • Handle background_image_alt of Collection in dashboard2.0
  • Add background_image_alt to Category model
  • Expose background_image_alt to Category in API
  • Handle background_image_alt of Category in dashboard
  • Handle background_image_alt of Category in dashboard2.0
  • Update thumbnail_url field to use ProductImage type

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.

@fowczarek fowczarek self-assigned this Dec 11, 2018
saleor/graphql/product/types.py Outdated Show resolved Hide resolved
saleor/product/models.py Show resolved Hide resolved
saleor/graphql/product/types.py Outdated Show resolved Hide resolved
saleor/product/templatetags/product_images.py Outdated Show resolved Hide resolved
saleor/graphql/product/types.py Outdated Show resolved Hide resolved
saleor/graphql/product/types.py Outdated Show resolved Hide resolved
saleor/product/models.py Outdated Show resolved Hide resolved
@fowczarek fowczarek changed the title Category and Collection images should contain alt_text Images should contain alt_text Dec 14, 2018
@fowczarek fowczarek changed the title Images should contain alt_text Add alt text to Product thumbnail and background_image of Collection and Category Dec 14, 2018
@fowczarek fowczarek changed the title Add alt text to Product thumbnail and background_image of Collection and Category Add alt text to Product thumbnail and background_image of Collection and Category Dec 14, 2018
@codecov
Copy link

codecov bot commented Dec 14, 2018

Codecov Report

Merging #3429 into master will increase coverage by <.01%.
The diff coverage is 90.19%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3429      +/-   ##
==========================================
+ Coverage   89.73%   89.74%   +<.01%     
==========================================
  Files         237      237              
  Lines       12912    12925      +13     
  Branches     1308     1304       -4     
==========================================
+ Hits        11587    11599      +12     
  Misses        921      921              
- Partials      404      405       +1
Impacted Files Coverage Δ
saleor/dashboard/category/forms.py 100% <ø> (ø) ⬆️
saleor/dashboard/collection/forms.py 100% <ø> (ø) ⬆️
saleor/checkout/views/__init__.py 83.58% <0%> (-1.27%) ⬇️
saleor/graphql/product/mutations/products.py 96.25% <100%> (+0.01%) ⬆️
saleor/product/templatetags/product_images.py 96.92% <100%> (+0.14%) ⬆️
saleor/graphql/order/types.py 85.95% <100%> (ø) ⬆️
saleor/seo/schema/email.py 100% <100%> (ø) ⬆️
saleor/product/models.py 93.02% <100%> (+0.66%) ⬆️
saleor/data_feeds/google_merchant.py 71.92% <33.33%> (-0.64%) ⬇️
saleor/graphql/product/types.py 97.3% <96.55%> (+0.49%) ⬆️
... and 3 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 3e6799e...45111b9. Read the comment docs.

@codecov
Copy link

codecov bot commented Dec 14, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@3e6799e). Click here to learn what that means.
The diff coverage is 89.09%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #3429   +/-   ##
=========================================
  Coverage          ?   89.76%           
=========================================
  Files             ?      237           
  Lines             ?    12938           
  Branches          ?     1312           
=========================================
  Hits              ?    11614           
  Misses            ?      920           
  Partials          ?      404
Impacted Files Coverage Δ
saleor/dashboard/category/forms.py 100% <ø> (ø)
saleor/dashboard/collection/forms.py 100% <ø> (ø)
saleor/checkout/views/__init__.py 83.58% <0%> (ø)
saleor/product/templatetags/product_images.py 96.92% <100%> (ø)
saleor/graphql/order/types.py 85.95% <100%> (ø)
saleor/seo/schema/email.py 100% <100%> (ø)
saleor/product/models.py 93.02% <100%> (ø)
saleor/data_feeds/google_merchant.py 71.92% <33.33%> (ø)
saleor/graphql/product/mutations/products.py 96.03% <83.33%> (ø)
saleor/graphql/product/types.py 97.3% <96.55%> (ø)

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 3e6799e...b5279fc. Read the comment docs.

@maarcingebala maarcingebala merged commit 9460fb2 into master Dec 14, 2018
@maarcingebala maarcingebala deleted the 3257/Add_alt_text_to_images branch December 14, 2018 12:00
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.

ProductImage GraphQL type should contain alt_text
3 participants