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

Fix: "Override" message only displays if there's a change on the tree #4899

Merged
merged 4 commits into from
Jun 28, 2024

Conversation

ElinorW
Copy link
Contributor

@ElinorW ElinorW commented Jun 27, 2024

Fixes #4853

if the Open API tree has changes and a user wishes to open a new description, the override message will appear else, no message appears even after regeneration

Steps to test:

  1. Load extension
  2. Open an API Description
  3. Select paths and generate a client/plugin/manifest
  4. When the tree reloads, try to open an API description file again
  5. Observe no message
  6. Now select/unselect a node or some nodes, then try to open an API description file
  7. Observe the message appears

@ElinorW ElinorW requested a review from a team as a code owner June 27, 2024 18:29
@ElinorW ElinorW changed the base branch from main to elinor/add-kiota-workspace June 27, 2024 18:29
Copy link

sonarcloud bot commented Jun 28, 2024

@ElinorW ElinorW merged commit 361d3ae into elinor/add-kiota-workspace Jun 28, 2024
204 checks passed
@ElinorW ElinorW deleted the elinor/fix-override-message branch June 28, 2024 12:23
Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

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

@ElinorW Sorry for commenting late here. If you look at the issue I think the implementation is failing a requirement: do not warn if the "sum" of modifications results in being in the initial step.

  1. generate something
  2. reload to edit
  3. check something
  4. uncheck the thing you just checked
  5. close (no warning should be displayed)

@ElinorW
Copy link
Contributor Author

ElinorW commented Jul 1, 2024

@ElinorW Sorry for commenting late here. If you look at the issue I think the implementation is failing a requirement: do not warn if the "sum" of modifications results in being in the initial step.

  1. generate something
  2. reload to edit
  3. check something
  4. uncheck the thing you just checked
  5. close (no warning should be displayed)

Oh right... hmm....so I should compare the current state of the tree to it's initial state...

@ElinorW ElinorW restored the elinor/fix-override-message branch July 12, 2024 08:04
ElinorW added a commit that referenced this pull request Aug 22, 2024
* add tree view

* add Api files conatiner and remove previous containers

* rename workspace title

* combine search and open description functions

* Add 'close description' button to api title node

* add close description dialog

* add generate option step

* added plugin dialog steps

* added icon toggling

* add workspace.json file to workspace

* Fix some server configs

* Ensure the RPC commands use preview features if config is enabled.

* - updates references kiota version for CLI

* - cleans up localization files from unused resource

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* - removes unimplemented command

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* - adds the environment variable passing to the json RPC server

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* - refactors to constant

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* - removes serializers in preview mode

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* - code linting

* - initial plugin generation

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* Fixed the collection of plugin name

* rename title string

* Add plugin type step

* add generate a manifest type

* close description after generation

* add "Edit Path' button

* add regenerate call

* update file name

* enable editing paths on api explorer

* add regenerate functionality

* - bumps kiota versions to avoid updates which confuses @sebastienlevert and @maisarissi

* - adds FAQ documentation for vs code reinstalling over

* add regeneration button on api explorer

* remove automatic workspace.json file add

* replace string

* update icon

* add plugin re-generation

* add warning notification

* add save notification

* fix delete description appearing on wrong nodes

* remove open file command

* remove output path validation and default to ouptut folder

* move constants to separate file

* remove path autoselection when description is loaded for the first time

* fix workspace.json file not opening

* hide add and remove icon on apiTitle node

* undo closing descriptions after generation

* Adding the automatic sideloading script

* Update to using vsx

* fix icons display

* Merge branch 'main' into elinor/add-kiota-workspace

* remove welcome translations

* remove welcome string translation

* add string translations

* remove unused search lock function

* add french translations

* added czech translations

* add portuguese translations

* update output diectory string

* set workspace file constant

* add else clause

* remove TODO comments

* return vscode error

* add types

* use nullish coalescing operator instead of Logical OR

* add spanish translations

* add italian translation

* add chinese translations

* remove unused functions

* update static strings

* add missing l10n

* update string typo

* update static string localization files

* update french string

* remove else

Co-authored-by: Musale Martin <martinmshale@gmail.com>

* add plugin output selection

* add output directory selection for client generation

* add output directory selection for manifest generation

* add polish translations

* add russian translations

* add swahili translations

* add success message and toggle icons

* add constants

* localize string

* add default and browse output options

* add dropdown for api path selection

* remove unused filter property

* remove else

Co-authored-by: silaskenneth <silaskenneth1@gmail.com>

* update icon

* Fixing vscode sideloading script for Windows

* enable generation from a deeplink

* Updates plugin naming

* update vscode engine

* bump kiota extension version

* Task: Display client/plugin name on API explorer  (#4801)

* hide information messages

* update warning message display

* update regenerate function

* Add constants

* Fix: "Override" message only displays if there's a change on the tree (#4899)

* code clean up

* update plugin type to accept array

* chore: lock update

* chore: bumps version to avoid auto-update

* Fixes unselected paths

* format

* fix regeneration

* API change to migrate lockfile to workspace file

* Adds connections to migrate workspace file

* Fix path maching

* Update vscode/microsoft-kiota/src/openApiTreeProvider.ts

* Fixes plugin generation check

* Fix: Add paste path functionality (#4994)

* Fix: Kiota extension works without a workspace folder open (#4958)

* Fix: Workspace file display (#5029)

* Fix: Display "override" message only when changes have been made (#5048)

* fix typo issue

* fix typecase

* fix cwd update

* chore: bumps extension engine version

* chore: updates lock file

* Feat: Add migration dialog (#5144)

* chore: adds missing french translations

* add missing translations

* simpify function

* rename function

* fix: bumps vscode extension version to allow side-loading

* update message display

* use workspace instead of lock

Co-authored-by: Andrew Omondi <andrueastman@users.noreply.github.com>

* use workspaceFile instead

* format file

* add missing translations

* update function name

* format file

---------

Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: Andrew Omondi <anomondi@microsoft.com>
Co-authored-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: Eastman <andrueastman@users.noreply.github.com>
Co-authored-by: Sébastien Levert <slevert@microsoft.com>
Co-authored-by: Musale Martin <martinmshale@gmail.com>
Co-authored-by: silaskenneth <silaskenneth1@gmail.com>
Co-authored-by: Sébastien Levert <sebastienlevert@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Kiota should show the "override" message only when there are changes not saved
3 participants