Image attributes - #497
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #497 +/- ##
==========================================
+ Coverage 88.50% 88.93% +0.43%
==========================================
Files 62 63 +1
Lines 10803 10903 +100
==========================================
+ Hits 9561 9697 +136
+ Misses 1242 1206 -36 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@marcio-ota is this PR still is draft state? |
|
Hi @amantoux, Is everything ok with the PR? Any other suggestions? |
It was still tagged as draft so we did not review it |
There was a problem hiding this comment.
Thank you for the PR @marcio-ota.
I left some comments, can you please take a look?
@Amir-P Any additional comment?
| static final BlockEmbed horizontalRule = BlockEmbed('hr'); | ||
| static BlockEmbed image(String source) => | ||
| BlockEmbed('image', data: {'source': source}); | ||
| static BlockEmbed image(String source, Map<String, dynamic> data) { |
There was a problem hiding this comment.
This is introducing a breaking change in the API, can data be an optional parameter?
There was a problem hiding this comment.
@marcio-ota It doesn't seem you have addresses this comment
| static BlockEmbed image(String source, Map<String, dynamic> data) { | ||
| final newData = Map<String, dynamic>.from(data); | ||
| newData['source'] = source; | ||
| return BlockEmbed('image', data: newData); | ||
| } |
There was a problem hiding this comment.
Sorry for the late review and thanks for contributing @marcio-ota! In addition to @amantoux comments, I have one tiny simplification suggestion:
| static BlockEmbed image(String source, Map<String, dynamic> data) { | |
| final newData = Map<String, dynamic>.from(data); | |
| newData['source'] = source; | |
| return BlockEmbed('image', data: newData); | |
| } | |
| static BlockEmbed image(String source, Map<String, dynamic> data) => | |
| BlockEmbed('image', data: {...data, 'source': source}); |
|
@marcio-ota Any chance to move forward on this PR? It would be great? |
amantoux
left a comment
There was a problem hiding this comment.
@marcio-ota Can you please address the comment? many thanks
| static final BlockEmbed horizontalRule = BlockEmbed('hr'); | ||
| static BlockEmbed image(String source) => | ||
| BlockEmbed('image', data: {'source': source}); | ||
| static BlockEmbed image(String source, Map<String, dynamic> data) { |
There was a problem hiding this comment.
@marcio-ota It doesn't seem you have addresses this comment
marcio-ota
left a comment
There was a problem hiding this comment.
Add image attribute to Parchment codec
@marcio-ota you're last commit was empty, is it intended? |
|
What do I need to do now? :-) |
I can co-author if you want, let me know |
|
@Amir-P can you please take a look? |
|
@marcio-ota Why are you closing this PR? We are close to merging |
Added image atributes.Image attributes for HTML tag compatibility:
<img src="http://fake.link/image.png" width="100" height="100">