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

Show error pop-up when failing to rename a project #6366

Merged
merged 17 commits into from
May 8, 2023

Conversation

Procrat
Copy link
Contributor

@Procrat Procrat commented Apr 20, 2023

Pull Request Description

Closes #5065: when a project can't be renamed, it now shows an error pop-up and stays in edit mode.

space3.mp4

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the Scala, Java, and Rust style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

@Procrat Procrat force-pushed the wip/procrat/rename-project-with-space-5065 branch from 4fed06f to cd96702 Compare April 20, 2023 12:22
@Procrat Procrat marked this pull request as ready for review April 20, 2023 12:26
Copy link
Member

@wdanilo wdanilo left a comment

Choose a reason for hiding this comment

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

Instead of reverting to an old name, the error should appear and the name should not be accepted, leaving the text field in the edit mode. If someone tried renaming the project to "really_long_and_complex name" and made a typo, reverting the name without giving the user the ability to fix the typo is a really bad UX.

app/gui/src/model/project/synchronized.rs Outdated Show resolved Hide resolved
app/gui/src/model/project/synchronized.rs Outdated Show resolved Hide resolved
@farmaazon
Copy link
Contributor

farmaazon commented Apr 20, 2023

Instead of reverting to an old name, the error should appear and the name should not be accepted, leaving the text field in the edit mode. If someone tried renaming the project to "really_long_and_complex name" and made a typo, reverting the name without giving the user the ability to fix the typo is a really bad UX.

@Procrat So, this would need checking it on our side (We cannot keep edit mode waiting for the engine's response).

As the project's name must be a valid identifier, we could just check if it's parsed as Cons (Var also could be accepted, but I'm not sure).

Reverting name when engine returned error should be still kept.

app/gui/view/src/popup.rs Outdated Show resolved Hide resolved
app/gui/view/src/popup.rs Outdated Show resolved Hide resolved
@farmaazon
Copy link
Contributor

@Procrat please update the PR description and the video with the new behavior.

@Procrat
Copy link
Contributor Author

Procrat commented Apr 24, 2023

@Procrat please update the PR description and the video with the new behavior.

Done.

@Procrat Procrat requested review from wdanilo and removed request for wdanilo April 24, 2023 14:23
CHANGELOG.md Outdated Show resolved Hide resolved
app/gui/src/model/project/synchronized.rs Outdated Show resolved Hide resolved
app/gui/view/src/popup.rs Outdated Show resolved Hide resolved
app/gui/view/src/popup.rs Outdated Show resolved Hide resolved
* develop:
  Turn null into UnexpectedExpression when Union type is incomplete (#6415)
  Ensure that IO.println does not fail if `to_text` returned a non-Text value. (#6223)
  Improve inlining of `<|` on (GraalVM EE) (#6384)
  Feat: update templates styles and feature (#6071)
  5127 Add Table.parse_to_columns to parse a single column to a set of columns. (#6383)
  URL handling (#6243)
  Exclude comparison operators from modifier logic (#6370)
  Better cleanup of project management test suite (#6392)
  Fix all eslint errors (#6267)
  Infer SQLite types locally (#6381)
  Vector Editor with List Editor and adding elements. (#6363)
  Add typechecks to Aggregate and Cross Tab (#6380)
  Forbid edits in read-only mode (#6342)
  Add Table.parse_text_to_table to convert Text to a Table. (#6294)
  Adding typechecks to Column Operations (#6298)
  Rollback cloud options groups (#6331)
  Project folder not renamed after project name change (#6369)
  Add `replace`, `trim` to Column. Better number parsing. (#6253)
  Read-only mode for controllers (#6259)
  Prevent default for all events, fixing multiple IDE bugs (#6364)
@vitvakatu
Copy link
Contributor

QA Report 🔴

I assume the popup with the error should always be visible, even if the scene is panned. This is not the case.

Screenshot 2023-04-27 at 21 42 20

@Procrat
Copy link
Contributor Author

Procrat commented Apr 28, 2023

Good catch, @vitvakatu. I've found the reason: I had changed the pop-up's layer to the default layer of Label, which is the tooltip, but that one moves along when panning. Now, the reason why I originally deleted the code that explicitly sets it to the panel layer, is because that created this super weird bug where the other text on that layer just disappears (status bar, project name, breadcrumbs, project switcher, ...). I had spent some time looking into what could cause it, but I'm all out of ideas really.

popup-layer-bug

@vitvakatu
Copy link
Contributor

@kazcw @wdanilo do you have any ideas about what can cause this issue?

@Procrat
Copy link
Contributor Author

Procrat commented Apr 28, 2023

You can try it out on this branch: wip/procrat/temp-rename-project-with-space-5065-panel-layer

@kazcw
Copy link
Contributor

kazcw commented Apr 28, 2023

This is in the log:

[WARN] lib/rust/ensogl/component/text/src/component/text.rs:1409 Internal error. Line metrics was not computed.

It might be relevant, as I've never seen it come up before

Edit: The bug always happens, this warning sometimes does not. Probably not related.

@kazcw
Copy link
Contributor

kazcw commented Apr 28, 2023

It seems related to using multiple fonts in the same layer. If I remove label.set_font(font) from Label, the problem does not occur

@kazcw
Copy link
Contributor

kazcw commented Apr 28, 2023

I have found the problem. I'll have a fix ready later today.

@Procrat
Copy link
Contributor Author

Procrat commented May 2, 2023

It seems to work with the changes in #6477, so once that's merged, this PR should be good for another round of QA.

mergify bot pushed a commit that referenced this pull request May 2, 2023
Support rendering multiple flavors of a shape system in the same layer. Fixes bugs seen as text disappearing when multiple fonts are used together (#6460 and issue discussed in #6366).
@sylwiabr
Copy link
Member

sylwiabr commented May 5, 2023

@Procrat who is doing a QA here? can we merge it?

@Procrat
Copy link
Contributor Author

Procrat commented May 5, 2023

@Procrat who is doing a QA here? can we merge it?

@sylwiabr Ilya was going to do another round, but he's been delayed as you know. We can ask someone else if it's urgent.

@sylwiabr
Copy link
Member

sylwiabr commented May 5, 2023

I think Ilia is quite overloaded and will be later today, @mwu-tow or @MichaelMauderer can you do QA here?

@MichaelMauderer
Copy link
Contributor

I can have a look today.

Copy link
Contributor

@vitvakatu vitvakatu left a comment

Choose a reason for hiding this comment

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

Sorry for the delay, QA passed. Next time please merge develop into this branch, it didn't work without fixes from there. I made a merge myself, please check for conflicts before merging this PR.

@Procrat Procrat added CI: Ready to merge This PR is eligible for automatic merge CI: Keep up to date Automatically update this PR to the latest develop. labels May 5, 2023
@mergify mergify bot merged commit 069fcf3 into develop May 8, 2023
@mergify mergify bot deleted the wip/procrat/rename-project-with-space-5065 branch May 8, 2023 10:12
Procrat added a commit that referenced this pull request May 10, 2023
* develop: (28 commits)
  Add tests for Date.until, Date.next and Date.previous. (#6606)
  Improve `Non_Unique_Primary_Key` error, split file format detection into read/write, improve SQLite format detection (#6604)
  tokenize_to_columns or parse_to_columns results in a single column we shouldn't add the  1 (#6607)
  Fix node editing race condition (#6594)
  Add format to the in-memory Column (#6538)
  Fix dashboard issues (part 2) (#6511)
  Fix visualisation type selector artifacts rendered after node preview visualisation was closed. (#6575)
  Revert typescript CI Lint changes (#6602)
  Fix the Engine version check in GUI (#6570)
  Show error pop-up when failing to rename a project (#6366)
  Small changes from Book Club issues (#6533)
  "at_least_one" flag for tokenize_to_rows (#6539)
  Benchmark Engine job runs only engine, not Enso benchmarks (#6534)
  Catch 5813 and avoid crash (#6585)
  Fix opening links in desktop IDE (#6507)
  Identify SyntaxError exception and avoid printing a stack trace (#6574)
  Fix dashboard issues (#6502)
  Let ChangesetBuilder.invalidated search even container elements (#6548)
  Fix #5075: stop panning on full-screen visualisation (#6530)
  Only `Join_Kind.Inner` removes the common-named columns (#6564)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Keep up to date Automatically update this PR to the latest develop. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Renaming project does not work if the name contains a space.
7 participants