This is only an issue for the old style (not in stacktrace) buttons.
I did not add a test for this; there are many tests for this code in the
new workflow, inside UnitInfo.handleSourceEdit, etc, and this code path
will be removed soon hopefully.
I *did* test manually and saw that it works.
Change-Id: Iac8ba4cb775b9b15c8db1c1cadd4701da81452be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149382
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
We're not currently working on this, and it has some dependencies that
interfere with publishing the migration tool. If we wind up needing
it again, we can always revert.
Change-Id: Ia6219ac376cef77bda7470777eaf2bebf38769b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149343
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
Relands https://dart-review.googlesource.com/c/sdk/+/148642
Due to a z-index bug, regions are showing up on top of the popup. Fixed.
A regression during a previous a.button/.button change that meant that
the close button wasn't rendered as a button.
Previous change from `a.button/.button` reduced the specificity which
caused incorrect font color in edit link buttons. This has been fixed by
using `.button, a.button` so that we keep the desired specificity but
also keep applying the style to all elements with the `button` class.
Change-Id: Idb5eb154904430d946a80b7574537564b7c71bd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148646
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
I noticed that failed GET requests did not show the error popup. At the
time it seemed like uncommon enough to not be a priority, but this is
occurring frequently for windows users, so it's not reasonable to rule
this out and should be handled.
I also have seen that if the preview server is killed, we get an
unhandled `ProgressEvent` error which is just "instance of minified:ew",
handle that case more gracefully as well.
Change-Id: I4f1f307dc33cd7bf0d76a9702df6728dda09926e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148601
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Ensure that the preview server responds with full paths so that the
front end does not need to do path magic on relative links, and test
that those full paths are correct on both windows and linux.
Remove [UnitLink.uri], as it is no longer correct, and it does not have
access to a [PathMapper] which is necessary to build a correct URI.
Change-Id: I7ef764d84c0859d72a21134dc042f837767e91b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148565
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Previously, the backend was returning a relative URI, but that doesn't
work when you have stack traces across root directories. So the front
end used path logic to turn the relative path into an absolute one, but
it didn't do this correctly on windows.
Instead just send an absolute path (still a relative URI, though) from
the backend.
Change-Id: Ied06a9d948851fcf6dc1d4aa007961d3d2a000fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148564
Reviewed-by: Paul Berry <paulberry@google.com>
This reverts commit 480e34ce99.
Reason for revert: `button, .button` is not specific enough, has too low of precedence, resulting in edit link buttons getting the wrong color. Will reland as `button, .button, a.button`. Thanks CSS :)
Original change's description:
> [nnbd_migration] Fix two popup style bugs
>
> Due to a z-index bug, regions are showing up on top of the popup. Fixed.
>
> A regression during a previous a.button/.button change that meant that
> the close button wasn't rendered as a button.
>
> Change-Id: I2c8b84655bd8afdbc0163f5dd810bca84c3db8b2
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148642
> Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
> Commit-Queue: Paul Berry <paulberry@google.com>
> Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
> Reviewed-by: Paul Berry <paulberry@google.com>
TBR=paulberry@google.com,mfairhurst@google.com,srawlins@google.com
Change-Id: I29f92aaa79c6285e2822866660e1b5f77b1f43ae
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148644
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
These interfaces acted as a temporary bridge to allow analysis server
core classes to provide services needed by nnbd_migration without
forcing analysis_server to depend on nnbd_migration; that in turn
allowed the analysis server to provide migration services to dartfix.
Now that we no longer use the analysis server nor dartfix for
migration, these interface classes are no longer needed.
As of this commit, the nnbd_migration package no longer depends on
analysis_server.
Change-Id: Ia923d91dd59c9a612000da8b0c9ead8a68686d89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148560
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Previously we re-used pages.dart from the analysis server. This paves
the way for making nnbd_migration independent of the analysis server,
which will allow it to be published on pub.
Note that only the portions of pages.dart that are actually used by
nnbd_migration are retained.
Change-Id: I48db228a3bf372cf918f2d2719f8f5415ddfc193
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148511
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
This code was necessary when the NNBD migration engine was part of the
analysis server, to allow migration to be run in-process. Now that
it's been separated to its own library, it always runs in process, so
this code is not needed anymore.
Change-Id: Id9e497dca6700ad804f2410cb3b20107be3a4bd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148503
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
These tests were initially based on analysis server tests, so they
shared a lot of analysis server infrastructure. However, none of that
infrastructure was really needed; we can test equally well just using
analyzer infrastructure. This helps pave the way for removing the
dependency from nnbd_migration on analysis_server, which will in turn
allow nnbd_migration to be published as its own package.
Change-Id: Icccb73a6248a0b766db5cfe66f42a6dceac0d944
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148540
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Change `handleInsertion` to use a `SourceEdit` instead, and update
`PreviewSite` to use it, but otherwise do not change `PreviewSite`. That
can be tested later when we have new `HintAction`s that allow us to
exercise this new code.
Change-Id: Idd6d782e003d4d643abb5770daa9055685f2e76a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148186
Reviewed-by: Paul Berry <paulberry@google.com>
Previous windows-incompatible implementation of hint action mapped the
path unnecessarily. The path for the new hint action comes from the AST
node and not a web URL and therefore should not be (and cannot be)
mapped for it to work on windows.
In the process of fixing this on cli_test, I missed this place where an
extra map was added in the preview_site test code which causes the test
to fail on windows.
Change-Id: If8d175379f0cb9fe864ab1f588af514a17b4758b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148229
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
This existed solely to have a centralized location for the analysis
server's dependencies on nnbd_migration. Now that nnbd_migration
doesn't depend on the analysis server, there's no need for it anymore.
Change-Id: I24b231337b1f724840b4533afef1672241b0af4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148181
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
We no longer use the analysis server or dartfix for migration.
This should unblock removing migration integration from dartfix, which
will unblock publishing dartfix.
It should also pave the way for future changes that will allow us to
publish the NNBD migration tool on pub, which in turn will allow us to
provide updates and bug fixes to the migration tool without having to
publish a new Dart or Flutter SDK.
Change-Id: I9f128b61a2983befc5ef686867dab3db87fd6855
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148020
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This is a step toward integrating the new migration CLI with dartdev.
It's necessary because dartdev handles arg parsing.
Change-Id: Ie50a69c434fd4d8873616e72b8274545cf0277d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148007
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>