Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[flutter_markdown] Added sizedImageBuilder to Markdown widget #6739

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

Merged
merged 42 commits into from
Apr 1, 2025

Conversation

M97Chahboun
Copy link
Contributor

@M97Chahboun M97Chahboun commented May 15, 2024

  • Adds sizedImageBuilder to Markdown widget.

Pre-launch Checklist

Copy link
Contributor

@domesticmouse domesticmouse left a comment

Choose a reason for hiding this comment

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

I'm curious how image height and width are parsed from the markdown.

@M97Chahboun
Copy link
Contributor Author

M97Chahboun commented May 18, 2024

@domesticmouse
If you means how markdown parse the h & w of image
check this line
parsed by get height and width from this format imageLink#200x200

@M97Chahboun M97Chahboun requested a review from domesticmouse May 18, 2024 20:19
@domesticmouse
Copy link
Contributor

Please add a test that covers width x height from markdown to final usage to prevent future breakage

@stuartmorgan-g
Copy link
Contributor

  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]

This was not done; please don't check boxes without completing the steps they describe.

  • All existing and new tests are passing.

CI indicates that the new test is not passing, which will need to be resolved before this can be reviewed.

@M97Chahboun M97Chahboun changed the title Added height and width to image builder [flutter_markdown] Added height and width to image builder Jun 4, 2024
@M97Chahboun
Copy link
Contributor Author

M97Chahboun commented Jun 5, 2024

I run image tests before any changes and I get :

══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following assertion was thrown while running async test code:
Golden "assets/images/golden/image_test/resource_asset_logo.png": Pixel test failed, 0.00% diff
detected.
Failure feedback can be found at
/Users/user/Development/packages/packages/flutter_markdown/test/failures

When the exception was thrown, this was the stack:
#0      LocalFileComparator.compare (package:flutter_test/src/_goldens_io.dart:106:5)
<asynchronous suspension>
#1      MatchesGoldenFile.matchAsync.<anonymous closure> (package:flutter_test/src/_matchers_io.dart:118:32)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from dart:async)

The exception was caught asynchronously.
════════════════════════════════════════════

Any suggestion please

@stuartmorgan-g
Copy link
Contributor

Tiny changes in golden files are normal if you are on a different host OS than the baseline (which is usually Linux). The issue on CI though is that you've dramatically changed an existing golden test, but haven't changed the expected output.

Please make a new test instead of changing that one, and set a new golden for it.

@stuartmorgan-g
Copy link
Contributor

From triage: @M97Chahboun Are you planning on updating the tests per the comments above?

@M97Chahboun
Copy link
Contributor Author

M97Chahboun commented Sep 3, 2024

@stuartmorgan I don't have any idea about golden test, but I will try to implement it ASAP

@stuartmorgan-g stuartmorgan-g marked this pull request as draft October 1, 2024 19:55
@stuartmorgan-g
Copy link
Contributor

Marking as a draft pending new, passing tests that can be reviewed.

@stuartmorgan-g
Copy link
Contributor

Since this is marked as a draft and hasn't been updated in several months, I’m going to close it so that our PR queue reflects active PRs. Please don't hesitate to submit a new PR if you decide to revisit this. Thanks!

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

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

LGTM

@stuartmorgan-g stuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 1, 2025
@M97Chahboun
Copy link
Contributor Author

Thank you for your reviews and patient

@auto-submit auto-submit bot merged commit bba066f into flutter:main Apr 1, 2025
82 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 1, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 1, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 1, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 2, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 2, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 2, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 2, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 2, 2025
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Apr 2, 2025
flutter/packages@125c117...07496eb

2025-04-02 [email protected] [multicast_dns]
MDnsClient::listen supports onError callback (flutter/packages#8888)
2025-04-02 [email protected] Upgrade tests to
use Xcode 16 and iOS 18 (flutter/packages#8968)
2025-04-01 [email protected] Manual roll Flutter from
1d954f4 to 05b5e79 (225 revisions) (flutter/packages#8960)
2025-04-01 [email protected] Drop deprecated HTML head
meta tags (flutter/packages#8970)
2025-04-01 [email protected] Adjust PR checklist formatter
discussion (flutter/packages#8924)
2025-04-01 [email protected] Update CODEOWNERS username
(flutter/packages#8933)
2025-04-01 [email protected]
[flutter_markdown] Added sizedImageBuilder to Markdown widget
(flutter/packages#6739)
2025-04-01 [email protected] [google_maps_flutter] Skip impl copy
of iOS tests (flutter/packages#8975)
2025-04-01 [email protected] [google_maps_flutter] Skip more
hanging iOS tests (flutter/packages#8967)
2025-04-01 [email protected] [url_launcher] When not fully loaded,
clicking close causes the callback to not be triggered correctly.
(flutter/packages#8582)
2025-04-01 [email protected] [camera_avfoundation] Test utils
and mocks swift migration - part 2 (flutter/packages#8892)
2025-03-31 [email protected] [webview_flutter]
Skip flaky legacy tests on iOS (flutter/packages#8911)
2025-03-31 [email protected] [camera_android] Don't override
default fps range when not recording (flutter/packages#8891)
2025-03-31 [email protected] [google_maps_flutter] Fix
typo and remove duplicitous CHANGELOG entry (flutter/packages#8754)
2025-03-31 [email protected] [extension_gsi] Support the
latest version of googleapis_auth (flutter/packages#8931)
2025-03-31 49699333+dependabot[bot]@users.noreply.github.com
[dependabot]: Bump com.android.tools.build:gradle from 8.0.0 to 8.9.1 in
/packages/pigeon/platform_tests/test_plugin/android
(flutter/packages#8955)
2025-03-31 [email protected] [webview_flutter_wkwebview] Fixes crash
when sending undefined message via javascript channel
(flutter/packages#8776)
2025-03-31 49699333+dependabot[bot]@users.noreply.github.com
[dependabot]: Bump com.android.tools.build:gradle from 8.0.0 to 8.9.1 in
/packages/pigeon/platform_tests/alternate_language_test_plugin/android
(flutter/packages#8946)
2025-03-31 [email protected]
[interactive_media_ads] Fixes `AdEventType`s not triggering on iOS in
release mode (flutter/packages#8918)
2025-03-31 [email protected] [google_maps_flutter] Skip test that
hangs iOS CI (flutter/packages#8958)
2025-03-28 [email protected] Manual roll Flutter from
b16430b to 1d954f4 (114 revisions) (flutter/packages#8922)
2025-03-28 [email protected] [camera_avfoundation] Test utils
and mocks swift migration - part 3 (flutter/packages#8912)
2025-03-27 [email protected] Use a more deterministic way of
waiting for ad widgets to be ready. (flutter/packages#8920)
2025-03-27 [email protected] [camera_avfoundation] Test utils
and mocks swift migration - part 1 (flutter/packages#8890)
2025-03-27 [email protected] [pigeon] correct usage of extended
generics in generator methods (flutter/packages#8910)
2025-03-27 [email protected] [video_player] Fix
layout issue caused by `Transform.rotate` not affecting space
calculation. (flutter/packages#8685)
2025-03-27 [email protected]
[shared_preferences] Fix a late initialized error with the example app
(flutter/packages#8540)
2025-03-26 [email protected] [various] Disable sandbox in Chrome
dart tests (flutter/packages#8909)
2025-03-25 [email protected] [tool] Move changed file detection to
base command class (flutter/packages#8730)
2025-03-25 [email protected] [Camera] Add lens
type information (iOS) (flutter/packages#8723)
2025-03-25 [email protected] [pigeon] kotlin equality methods
(flutter/packages#8887)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

---------

Co-authored-by: Maurice Parrish <[email protected]>
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Apr 3, 2025
flutter/packages@125c117...07496eb

2025-04-02 [email protected] [multicast_dns]
MDnsClient::listen supports onError callback (flutter/packages#8888)
2025-04-02 [email protected] Upgrade tests to
use Xcode 16 and iOS 18 (flutter/packages#8968)
2025-04-01 [email protected] Manual roll Flutter from
1d954f4 to 05b5e79 (225 revisions) (flutter/packages#8960)
2025-04-01 [email protected] Drop deprecated HTML head
meta tags (flutter/packages#8970)
2025-04-01 [email protected] Adjust PR checklist formatter
discussion (flutter/packages#8924)
2025-04-01 [email protected] Update CODEOWNERS username
(flutter/packages#8933)
2025-04-01 [email protected]
[flutter_markdown] Added sizedImageBuilder to Markdown widget
(flutter/packages#6739)
2025-04-01 [email protected] [google_maps_flutter] Skip impl copy
of iOS tests (flutter/packages#8975)
2025-04-01 [email protected] [google_maps_flutter] Skip more
hanging iOS tests (flutter/packages#8967)
2025-04-01 [email protected] [url_launcher] When not fully loaded,
clicking close causes the callback to not be triggered correctly.
(flutter/packages#8582)
2025-04-01 [email protected] [camera_avfoundation] Test utils
and mocks swift migration - part 2 (flutter/packages#8892)
2025-03-31 [email protected] [webview_flutter]
Skip flaky legacy tests on iOS (flutter/packages#8911)
2025-03-31 [email protected] [camera_android] Don't override
default fps range when not recording (flutter/packages#8891)
2025-03-31 [email protected] [google_maps_flutter] Fix
typo and remove duplicitous CHANGELOG entry (flutter/packages#8754)
2025-03-31 [email protected] [extension_gsi] Support the
latest version of googleapis_auth (flutter/packages#8931)
2025-03-31 49699333+dependabot[bot]@users.noreply.github.com
[dependabot]: Bump com.android.tools.build:gradle from 8.0.0 to 8.9.1 in
/packages/pigeon/platform_tests/test_plugin/android
(flutter/packages#8955)
2025-03-31 [email protected] [webview_flutter_wkwebview] Fixes crash
when sending undefined message via javascript channel
(flutter/packages#8776)
2025-03-31 49699333+dependabot[bot]@users.noreply.github.com
[dependabot]: Bump com.android.tools.build:gradle from 8.0.0 to 8.9.1 in
/packages/pigeon/platform_tests/alternate_language_test_plugin/android
(flutter/packages#8946)
2025-03-31 [email protected]
[interactive_media_ads] Fixes `AdEventType`s not triggering on iOS in
release mode (flutter/packages#8918)
2025-03-31 [email protected] [google_maps_flutter] Skip test that
hangs iOS CI (flutter/packages#8958)
2025-03-28 [email protected] Manual roll Flutter from
b16430b to 1d954f4 (114 revisions) (flutter/packages#8922)
2025-03-28 [email protected] [camera_avfoundation] Test utils
and mocks swift migration - part 3 (flutter/packages#8912)
2025-03-27 [email protected] Use a more deterministic way of
waiting for ad widgets to be ready. (flutter/packages#8920)
2025-03-27 [email protected] [camera_avfoundation] Test utils
and mocks swift migration - part 1 (flutter/packages#8890)
2025-03-27 [email protected] [pigeon] correct usage of extended
generics in generator methods (flutter/packages#8910)
2025-03-27 [email protected] [video_player] Fix
layout issue caused by `Transform.rotate` not affecting space
calculation. (flutter/packages#8685)
2025-03-27 [email protected]
[shared_preferences] Fix a late initialized error with the example app
(flutter/packages#8540)
2025-03-26 [email protected] [various] Disable sandbox in Chrome
dart tests (flutter/packages#8909)
2025-03-25 [email protected] [tool] Move changed file detection to
base command class (flutter/packages#8730)
2025-03-25 [email protected] [Camera] Add lens
type information (iOS) (flutter/packages#8723)
2025-03-25 [email protected] [pigeon] kotlin equality methods
(flutter/packages#8887)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

---------

Co-authored-by: Maurice Parrish <[email protected]>
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App p: flutter_markdown
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants