Skip to content

Conversation

@dnenov
Copy link
Collaborator

@dnenov dnenov commented Feb 21, 2023

Purpose

This PR is a follow-up and is based on #13732. It goes further in customizing the Python Script editor in a number of ways.

Exit saved/unsaved script

exiting_with_unsaved_changes

Folding tests

folding_test

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated

Release Notes

  • icon update
  • introduced zoom-in/out buttons
  • introduced undo/redo buttons
  • change multiple reserved keyword colors
  • enabled text-folding
  • custom (tab) indentation strategy
  • now prompts the user to save unsaved changes on 'Esc' exit

Reviewers

@sm6srw
@Amoursol

FYIs

@Jingyi-Wen
@hwahlstrom

dnenov added 11 commits February 1, 2023 17:34
- updated python scrip editor icons
- minor update for one of the icons
- due to readability issues, changed the hyperlink text color
- first implementation working
- added custom Python indentation strategy based around line ending with a column
- WIP code, still playing with the avalon editor visual capabilities
- Implemented the 'save on exit' (still missing prompt)
- Folding strategy works more or less correctly, except we are not tracking folded states (which we can) - more work needed, but should we?
- added buttons for the undo/redo and zoom-in/out functionalities
- updated keywords as per latest Figma color scheme
- added a warning message with controls when user tries to exit the Script interface by pressing the Escape button, but has unsaved changes
- made Avalon edit support classes Internal
@Amoursol
Copy link
Contributor

@dnenov can you please also put an image or GIF inside of this PR? We often refer back to these when creating presentations etc 😊

- now will correctly continue after ":" not being the end of the text line (no tabbing)
- testing screen resolution against 24x24 icons
@dnenov
Copy link
Collaborator Author

dnenov commented Feb 22, 2023

@dnenov can you please also put an image or GIF inside of this PR? We often refer back to these when creating presentations etc 😊

Of course! Adding them in as we are closing these chapters.

- updated icons back to 48x48px
- will disable any user interaction while in 'warning' mode
- forces the user to `keep editing` -> `save` -> `close`
@dnenov dnenov marked this pull request as ready for review February 22, 2023 19:07
@dnenov dnenov mentioned this pull request Feb 24, 2023
8 tasks
@sm6srw sm6srw self-requested a review February 24, 2023 13:17
@sm6srw
Copy link
Contributor

sm6srw commented Mar 1, 2023

@reddyashish
Copy link
Contributor

@dnenov There is one conflict on this PR. PTAL.

dnenov added 3 commits March 13, 2023 18:42
- re[placed with dynamo library brushes where possible
- unsaved changes prompt title and text localized
- removed old or unnecessary comments
- kept comments that help to clarify the logic
Copy link
Contributor

@reddyashish reddyashish left a comment

Choose a reason for hiding this comment

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

LGTM once the conflict is resolved

@reddyashish
Copy link
Contributor

@dnenov Thank you for addressing everything. Will wait for the self-service to finish.

@reddyashish
Copy link
Contributor

Passed, merging this.

@reddyashish reddyashish merged commit 228e017 into DynamoDS:master Mar 13, 2023
sm6srw pushed a commit to sm6srw/Dynamo that referenced this pull request Mar 29, 2023
* Python editor visual restyle - initial commit

- initial commit for python editor visual restyle
- for general idea of the desired scope, visit https://www.figma.com/file/1q7EWQGYO7pPDhyLf8nuwW/Python-node-editor-restyling?node-id=0%3A1&t=QGCSTKllX8Q7OnhK-0

* Icon Update

- updated python scrip editor icons

* Hover icon update

- minor update for one of the icons

* Change hyperlink color

- due to readability issues, changed the hyperlink text color

* Text Folding

- first implementation working

* Custom indentation strategy added

- added custom Python indentation strategy based around line ending with a column

* TabFoldingStrategy changes, saves on Esc exist, WIP

- WIP code, still playing with the avalon editor visual capabilities
- Implemented the 'save on exit' (still missing prompt)
- Folding strategy works more or less correctly, except we are not tracking folded states (which we can) - more work needed, but should we?

* Undo/Redo, Zoom-in/out buttons added

- added buttons for the undo/redo and zoom-in/out functionalities

* Keywords color update

- updated keywords as per latest Figma color scheme

* Warning bar on unsaved changes exit added

- added a warning message with controls when user tries to exit the Script interface by pressing the Escape button, but has unsaved changes
- made Avalon edit support classes Internal

* Fix tab folding

- now will correctly continue after ":" not being the end of the text line (no tabbing)

* Small icons test

- testing screen resolution against 24x24 icons

* Back to 48x48 icons

- updated icons back to 48x48px

* Disable UI when prompt to save changes

- will disable any user interaction while in 'warning' mode
- forces the user to `keep editing` -> `save` -> `close`

* Color brushes replaced with Dynamo brushes where possible

- re[placed with dynamo library brushes where possible

* Localized unsaved changes prompt texts

- unsaved changes prompt title and text localized

* Cleaned up tabfoldingstrategy comments

- removed old or unnecessary comments
- kept comments that help to clarify the logic

* Update ScriptEditorWindow.xaml
sm6srw pushed a commit that referenced this pull request Apr 5, 2023
* Python editor visual restyle - initial commit

- initial commit for python editor visual restyle
- for general idea of the desired scope, visit https://www.figma.com/file/1q7EWQGYO7pPDhyLf8nuwW/Python-node-editor-restyling?node-id=0%3A1&t=QGCSTKllX8Q7OnhK-0

* Icon Update

- updated python scrip editor icons

* Hover icon update

- minor update for one of the icons

* Change hyperlink color

- due to readability issues, changed the hyperlink text color

* Text Folding

- first implementation working

* Custom indentation strategy added

- added custom Python indentation strategy based around line ending with a column

* TabFoldingStrategy changes, saves on Esc exist, WIP

- WIP code, still playing with the avalon editor visual capabilities
- Implemented the 'save on exit' (still missing prompt)
- Folding strategy works more or less correctly, except we are not tracking folded states (which we can) - more work needed, but should we?

* Undo/Redo, Zoom-in/out buttons added

- added buttons for the undo/redo and zoom-in/out functionalities

* Keywords color update

- updated keywords as per latest Figma color scheme

* Warning bar on unsaved changes exit added

- added a warning message with controls when user tries to exit the Script interface by pressing the Escape button, but has unsaved changes
- made Avalon edit support classes Internal

* Fix tab folding

- now will correctly continue after ":" not being the end of the text line (no tabbing)

* Small icons test

- testing screen resolution against 24x24 icons

* Back to 48x48 icons

- updated icons back to 48x48px

* Disable UI when prompt to save changes

- will disable any user interaction while in 'warning' mode
- forces the user to `keep editing` -> `save` -> `close`

* Color brushes replaced with Dynamo brushes where possible

- re[placed with dynamo library brushes where possible

* Localized unsaved changes prompt texts

- unsaved changes prompt title and text localized

* Cleaned up tabfoldingstrategy comments

- removed old or unnecessary comments
- kept comments that help to clarify the logic

* Update ScriptEditorWindow.xaml
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.

5 participants