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

Major update 6 #1461

Merged
merged 3 commits into from
Oct 23, 2023
Merged

Major update 6 #1461

merged 3 commits into from
Oct 23, 2023

Conversation

EchoEllet
Copy link
Collaborator

  • The Quill editor and toolbar configurations are now refactored in one single class for each one
  • After changing one of the checkbox list values the controller will not request the keyboard focus by default
  • We have moved the configurations of the toolbar and the editor directly into the widget but we are still using inherited widgets internally
  • Fixes to some of the code after the refactoring

More changes...

@EchoEllet
Copy link
Collaborator Author

flutter_quill_extensions will fail again, we probably need to publish the package to pub.dev and then update things from flutter_quill_extensions, also we should publish the flutter_quill_extensions updates to pub.dev

@EchoEllet EchoEllet requested a review from singerdmx October 23, 2023 23:52
@singerdmx
Copy link
Owner

Another option is that you publish the package instead

@singerdmx singerdmx merged commit 45b43fa into singerdmx:master Oct 23, 2023
1 check passed
@EchoEllet
Copy link
Collaborator Author

Another option is that you publish the package instead

Are we talking about flutter_quill_extensions?? because you told me @Jon-Salmon has access to the publishing

@singerdmx
Copy link
Owner

Yes I mean if you don't want to be blocked on that. Create a new package

@EchoEllet
Copy link
Collaborator Author

EchoEllet commented Oct 23, 2023

Yes I mean if you don't want to be blocked on that. Create a new package

Do you mean fork the repository of flutter_quill_extensions??
They in the same repository but what I mean is publishing a copy of it

@singerdmx
Copy link
Owner

Oh pub.dev check url uniqueness? I see. Probably have to work around it

@singerdmx
Copy link
Owner

Yes

@singerdmx
Copy link
Owner

Sure

@Alspb
Copy link
Collaborator

Alspb commented Oct 24, 2023

Can't run the example - it shows failed assertion.

@EchoEllet
Copy link
Collaborator Author

Can't run the example - it shows failed assertion.

Can't run the example - it shows failed assertion.

Please clean the project and run it again and make sure to fetch the latest changes and rebase or merge

image

Can't encounter the issue you are facing, consider giving me more details so I can fix it

@Alspb
Copy link
Collaborator

Alspb commented Oct 24, 2023

Hm, it also works for me on Android emulator.
But on Linux it fails with pretty large stack trace. If you don't face the error on desktop, I'll put the details here.

@EchoEllet
Copy link
Collaborator Author

Hm, it also works for me on Android emulator. But on Linux it fails with pretty large stack trace. If you don't face the error on desktop, I'll put the details here.

if it is related to the Linux binary application building. then I can't fix it right now since this library is not supported for Linux yet as it uses plugins that don't support Linux yet. I will look into that soon but it would be helpful to share more details

@Alspb
Copy link
Collaborator

Alspb commented Oct 24, 2023

I think the idea of example is that it loads 'assets/sample_data.json' for mobile and 'assets/sample_data_nomedia.json' for desktop, and therefore works for desktop OS too, just without dealing with images, videos, etc.

The traceback is as follows:

Launching lib/main.dart on Linux in debug mode...

(app:21858): Gdk-CRITICAL **: 01:53:30.423: gdk_window_get_state: assertion 'GDK_IS_WINDOW (window)' failed
flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
flutter: The following assertion was thrown building TextLine(dirty, dependencies: [_QuillPressedKeysAccess],
flutter: state: _TextLineState#5f694):
flutter: width and height must be specified
flutter: 'package:flutter_quill_extensions/embeds/builders.dart':
flutter: Failed assertion: line 94 pos 11: 'width != null && height != null'
flutter:
flutter: The relevant error-causing widget was:
flutter:   TextLine
flutter:   TextLine:flutter-quill/lib/src/widgets/raw_editor/raw_editor.dart:984:22
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #2      ImageEmbedBuilder.build (package:flutter_quill_extensions/embeds/builders.dart:94:11)
flutter: #3      _TextLineState._getTextSpanForWholeLine (package:flutter_quill/src/widgets/text_line.dart:201:24)
flutter: #4      _TextLineState.build (package:flutter_quill/src/widgets/text_line.dart:158:22)
flutter: #5      StatefulElement.build (package:flutter/src/widgets/framework.dart:5409:27)
flutter: #6      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5297:15)
flutter: #7      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5462:11)
flutter: #8      Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
flutter: #9      ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5279:5)
flutter: #10     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5453:11)
flutter: #11     ComponentElement.mount (package:flutter/src/widgets/framework.dart:5273:5)
flutter: #12     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4182:16)
flutter: #13     Element.updateChild (package:flutter/src/widgets/framework.dart:3707:18)
flutter: #14     _TextLineElement._mountChild (package:flutter_quill/src/widgets/text_line.dart:1310:22)
flutter: #15     _TextLineElement.mount (package:flutter_quill/src/widgets/text_line.dart:1276:5)
flutter: ...     Normal element mounting (7 frames)
flutter: #22     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4182:16)
flutter: #23     MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6569:36)
flutter: #24     MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6581:32)
flutter: ...     Normal element mounting (281 frames)
flutter: #305    Element.inflateWidget (package:flutter/src/widgets/framework.dart:4182:16)
flutter: #306    MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6569:36)
flutter: #307    MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6581:32)
flutter: ...     Normal element mounting (22 frames)
flutter: #329    Element.inflateWidget (package:flutter/src/widgets/framework.dart:4182:16)
flutter: #330    Element.updateChild (package:flutter/src/widgets/framework.dart:3701:20)
flutter: #331    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
flutter: #332    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
flutter: #333    StatelessElement.update (package:flutter/src/widgets/framework.dart:5373:5)
flutter: #334    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
flutter: #335    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
flutter: #336    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
flutter: #337    StatelessElement.update (package:flutter/src/widgets/framework.dart:5373:5)
flutter: #338    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
flutter: #339    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
flutter: #340    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
flutter: #341    ProxyElement.update (package:flutter/src/widgets/framework.dart:5628:5)
flutter: #342    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
flutter: #343    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
flutter: #344    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
flutter: #345    ProxyElement.update (package:flutter/src/widgets/framework.dart:5628:5)
flutter: #346    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
flutter: #347    Element.updateChildren (package:flutter/src/widgets/framework.dart:3834:32)
flutter: #348    MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6594:17)
flutter: #349    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
flutter: #350    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
flutter: #351    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
flutter: #352    ProxyElement.update (package:flutter/src/widgets/framework.dart:5628:5)
flutter: #353    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
flutter: #354    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
flutter: #355    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5462:11)
flutter: #356    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
flutter: #357    StatefulElement.update (package:flutter/src/widgets/framework.dart:5485:5)
flutter: #358    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
flutter: #359    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
flutter: #360    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5462:11)
flutter: #361    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
flutter: #362    StatefulElement.update (package:flutter/src/widgets/framework.dart:5485:5)
flutter: #363    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
flutter: #364    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
flutter: #365    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
flutter: #366    ProxyElement.update (package:flutter/src/widgets/framework.dart:5628:5)
flutter: #367    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
flutter: #368    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
flutter: #369    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5462:11)
flutter: #370    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
flutter: #371    StatefulElement.update (package:flutter/src/widgets/framework.dart:5485:5)
flutter: #372    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
flutter: #373    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6441:14)
flutter: #374    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
flutter: #375    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
flutter: #376    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
flutter: #377    ProxyElement.update (package:flutter/src/widgets/framework.dart:5628:5)
flutter: #378    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
flutter: #379    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6441:14)
flutter: #380    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
flutter: #381    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
flutter: #382    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5462:11)
flutter: #383    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
flutter: #384    StatefulElement.update (package:flutter/src/widgets/framework.dart:5485:5)
flutter: #385    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
flutter: #386    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
flutter: #387    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5462:11)
flutter: #388    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
flutter: #389    StatefulElement.update (package:flutter/src/widgets/framework.dart:5485:5)
flutter: #390    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
flutter: #391    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
flutter: #392    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
flutter: #393    ProxyElement.update (package:flutter/src/widgets/framework.dart:5628:5)
flutter: #394    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
flutter: #395    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
flutter: #396    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
flutter: #397    ProxyElement.update (package:flutter/src/widgets/framework.dart:5628:5)
flutter: #398    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
flutter: #399    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
flutter: #400    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
flutter: #401    ProxyElement.update (package:flutter/src/widgets/framework.dart:5628:5)
flutter: #402    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
flutter: #403    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
flutter: #404    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5462:11)
flutter: #405    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
flutter: #406    StatefulElement.update (package:flutter/src/widgets/framework.dart:5485:5)
flutter: #407    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
flutter: #408    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
flutter: #409    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
flutter: #410    ProxyElement.update (package:flutter/src/widgets/framework.dart:5628:5)
flutter: #411    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
flutter: #412    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
flutter: #413    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5462:11)
flutter: #414    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
flutter: #415    StatefulElement.update (package:flutter/src/widgets/framework.dart:5485:5)
flutter: #416    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
flutter: #417    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
flutter: #418    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5462:11)
flutter: #419    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
flutter: #420    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2779:19)
flutter: #421    WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:916:21)
flutter: #422    RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:360:5)
flutter: #423    SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1297:15)
flutter: #424    SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1227:9)
flutter: #425    SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1085:5)
flutter: #426    _invoke (dart:ui/hooks.dart:170:13)
flutter: #427    PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:401:5)
flutter: #428    _drawFrame (dart:ui/hooks.dart:140:31)
flutter: (elided 2 frames from class _AssertionError)
flutter:
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
flutter: Another exception was thrown: type 'RenderErrorBox' is not a subtype of type 'RenderContentProxyBox?' in type cast
flutter: Another exception was thrown: type 'RenderErrorBox' is not a subtype of type 'RenderContentProxyBox?' in type cast
flutter: Another exception was thrown: A RenderEditor expected a child of type RenderEditableBox but received a child of type RenderErrorBox.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 6426 pos 12: 'child == _child': is not true.
flutter: Another exception was thrown: Duplicate GlobalKey detected in widget tree.

@Alspb
Copy link
Collaborator

Alspb commented Oct 24, 2023

Please also take a look at #1288, cause it seems to be connected with images which you're also working on.

@EchoEllet
Copy link
Collaborator Author

Please also take a look at #1288, cause it seems to be connected with images which you're also working on.

Sure, I will checkout tomorrow. But can you upload some images or short video??

@Alspb
Copy link
Collaborator

Alspb commented Oct 24, 2023

Please also take a look at #1288, cause it seems to be connected with images which you're also working on.

Sure, I will checkout tomorrow. But can you upload some images or short video??
Please find the video below:

insert_link_crash

@EchoEllet
Copy link
Collaborator Author

Please also take a look at #1288, cause it seems to be connected with images which you're also working on.

Sure, I will checkout tomorrow. But can you upload some images or short video??
Please find the video below:

insert_link_crash

Thank you for the report

As soon we finish the refactoring and other issues we will work on this one

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.

3 participants