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

Fix #176 -- Allow overriding the img-tag dimensions attributes #177

Merged
merged 3 commits into from
Jun 29, 2024

Conversation

atnartur
Copy link
Contributor

Closes #176

@codingjoe codingjoe self-requested a review June 28, 2024 14:08
@codingjoe codingjoe added the bug Something isn't working label Jun 28, 2024
@codingjoe codingjoe marked this pull request as draft June 28, 2024 14:38
@codingjoe
Copy link
Owner

Please let me know if you need help with the tests. I believe it's only the attribute order that changed, should be pretty straightforward. However, I would appreciate it if you could add a new test to prevent regression.

@atnartur
Copy link
Contributor Author

Thank you very much for your support and advice! I added a test to check new attributes and also fixed alt="None" value supported with the corresponding test.

I hope, everything will be okay in CI this time.

@atnartur atnartur marked this pull request as ready for review June 28, 2024 15:18
Copy link

codecov bot commented Jun 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (96af07e) to head (2afe108).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #177   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        13           
  Lines          486       486           
=========================================
  Hits           486       486           
Flag Coverage Δ
celery 84.77% <100.00%> (ø)
cleanup 88.27% <100.00%> (ø)
dj4.1 88.27% <100.00%> (ø)
dj4.2 88.27% <100.00%> (ø)
django-rq 84.77% <100.00%> (ø)
dramatiq 84.77% <100.00%> (ø)
drf 96.29% <100.00%> (ø)
macos-latest 88.47% <100.00%> (ø)
py3.10 88.27% <100.00%> (ø)
py3.12 88.27% <100.00%> (ø)
py3.8 88.27% <100.00%> (ø)
py3.9 88.27% <100.00%> (ø)
ubuntu-latest 88.27% <100.00%> (ø)
windows-latest 81.52% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@codingjoe codingjoe left a comment

Choose a reason for hiding this comment

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

Thanks, @atnartur, I took the liberty to amend some changes, like dropping a leftover print statement.
However, I want to not, that I also reverted your changes to the alt-attribute. Please beware that setting an alt attribute is required. There are cases, where an empty string is the best way to go, but that would be a matter for a separate patch.

@codingjoe codingjoe changed the title Add an ability to override img sizes via attributes Fix #176 -- Allow overriding the img dimensions attributes Jun 29, 2024
@codingjoe codingjoe changed the title Fix #176 -- Allow overriding the img dimensions attributes Fix #176 -- Allow overriding the img-tag dimensions attributes Jun 29, 2024
@codingjoe codingjoe merged commit 4c2636d into codingjoe:main Jun 29, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Override img[width] and img[height] attributes
2 participants