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

Misc changes #311

Closed
wants to merge 2 commits into from
Closed

Misc changes #311

wants to merge 2 commits into from

Conversation

cgestes
Copy link
Collaborator

@cgestes cgestes commented May 22, 2020

Small changes grouped together.

@cgestes
Copy link
Collaborator Author

cgestes commented May 22, 2020

PS: it also add support for flutter master. (can be dropped easily)

@cgestes
Copy link
Collaborator Author

cgestes commented May 23, 2020

dropped the fix for flutter master to make it build. let see :)

@codecov
Copy link

codecov bot commented May 23, 2020

Codecov Report

Merging #311 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #311   +/-   ##
=======================================
  Coverage   91.89%   91.89%           
=======================================
  Files          11       11           
  Lines        1074     1074           
=======================================
  Hits          987      987           
  Misses         87       87           

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 fc79a64...69b51f7. Read the comment docs.

@pulyaevskiy
Copy link
Contributor

dropped the fix for flutter master to make it build. let see :)

I'm going to update travis config to use master by default per our discussion.

@@ -53,7 +53,8 @@ abstract class Node extends LinkedListEntry<Node> {

/// Offset in characters of this node in the document.
int get documentOffset {
final parentOffset = (_parent is! RootNode) ? _parent.documentOffset : 0;
final parentOffset =
(_parent is! RootNode && _parent != null) ? _parent.documentOffset : 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

I've seen this come up quite a few times, but it's not clear what's the root cause here. In general _parent should never be null when you're asking for a documentOffset on a node.

It looks like the node was detached from the document tree when this is called. Do you have a reproduction for this issue? I think we should really have a test case for this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no I dont.
I found it with selection on the web, and thought it was safer this way.

@@ -11,7 +11,7 @@ class ZefyrScaffold extends StatefulWidget {
static ZefyrScaffoldState of(BuildContext context) {
final _ZefyrScaffoldAccess widget =
context.dependOnInheritedWidgetOfExactType<_ZefyrScaffoldAccess>();
return widget.scaffold;
return widget?.scaffold;
Copy link
Contributor

Choose a reason for hiding this comment

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

Scaffold is required for zefyr to work, what's the reason for null-check here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

avoid crash.

I dont think a 'of' function should crash when the scaffold is not found. It can be a way to know if we have one or not.

@@ -97,6 +97,9 @@ class InputConnectionController implements TextInputClient {
@override
void performAction(TextInputAction action) {
// no-op
final val = _lastKnownRemoteTextEditingValue;
onValueChanged(val.selection.start, '', '\n',
TextSelection.collapsed(offset: val.selection.start + 1));
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the logic behind this change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Pretty sure it's written in the commit. it fixes pressing enter in some cases. (I think in the Android emulator at least).

Copy link
Contributor

@pulyaevskiy pulyaevskiy left a comment

Choose a reason for hiding this comment

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

Thanks, these are great findings!
There is 3 separate issues here, as I see it:

  • documentOffset issue in notus
  • performAction impelementation in zefyr
  • null-check for ZefyrScaffold

It'd be easier to land these if they were in separate PRs, so that no one blocks the other. Wondering if you can split it even further?

@cgestes
Copy link
Collaborator Author

cgestes commented May 25, 2020

made 3 PR:
#322
#323
#324

kept two commits here:

  • bumping the version of quill_delta
  • add a .vscode/launch.json file to start the examples easily in vs code

@cgestes
Copy link
Collaborator Author

cgestes commented Oct 2, 2020

Core rewrite in branch 1.0-dev (see #409) makes this PR irrelevant.

@cgestes cgestes closed this Oct 2, 2020
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.

2 participants