Skip to content

Fix custom integration args quotes#19224

Merged
sergiou87 merged 2 commits intodevelopmentfrom
fix-custom-integration-args-quotes
Sep 9, 2024
Merged

Fix custom integration args quotes#19224
sergiou87 merged 2 commits intodevelopmentfrom
fix-custom-integration-args-quotes

Conversation

@sergiou87
Copy link
Member

@sergiou87 sergiou87 commented Sep 9, 2024

Closes #19218

Description

Based on top of #19223

This PR changes the way custom integration arguments are stored and handled across the app.

The parsing libraries used to split them into an array would remove any quotes from them, so they are stored correctly. However, when they're presented to the user in the preferences dialog, they would be joined into a string without those quotes. If they're then parsed and saved again, the resulting array of strings is completely different to what was stored before.

This PR makes it so that Desktop stores the exact string the user entered and only parses it into an array of strings when:

  1. The arguments string is gonna be validated, to make sure our parsing APIs don't complain about them.
  2. Right before launching the custom editor/shell, since we need those arguments in an array of strings.

Unfortunately, this requires a migration of existing saved custom editors and shells. When the app starts, the custom integrations are loaded, Desktop will check if they need to be migrated and the migrated settings will be persisted.

Release notes

Notes: [Fixed] Quotes are not removed from custom integration arguments

Copy link
Contributor

@tidy-dev tidy-dev left a comment

Choose a reason for hiding this comment

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

✨ Makes sense

Base automatically changed from custom-shell-stat-fix to development September 9, 2024 15:20
@sergiou87 sergiou87 merged commit 85a465c into development Sep 9, 2024
@sergiou87 sergiou87 deleted the fix-custom-integration-args-quotes branch September 9, 2024 15:22
sergiou87 added a commit that referenced this pull request Sep 9, 2024
Copy link

@hucynogen82 hucynogen82 left a comment

Choose a reason for hiding this comment

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

You

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.

The new integrations feature removes quotes

3 participants