Skip to content

Conversation

ViniTou
Copy link
Contributor

@ViniTou ViniTou commented Aug 4, 2025

🎫 Issue IBX-10414

Related PRs:

Description:

For QA:

List of affected create/update forms:

  • Content Type Group
  • Language
  • Link Manager
  • Object State / Object State Group
  • Role & Policy
  • Section
  • URL Wildcard
  • User password
  • User settings
  • Object State group and objects

Documentation:

@ViniTou ViniTou force-pushed the ibx-10414-drop-save-action branch from 1904f81 to a04dfc4 Compare August 19, 2025 06:33
@@ -256,14 +241,9 @@
<target state="new">Name</target>
<note>key: role_update.name</note>
</trans-unit>
<trans-unit id="453d030fbc11c10c842807ff213039adfffbe051" resname="role_update.save">
<trans-unit id="004e2e90e1b877d6a3c2def0a6f50ad62ef5f019" resname="role_update.save_and_close">
Copy link
Contributor

Choose a reason for hiding this comment

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

The key here is "role_update.save_and_close", but the translation is "Save". Is it intended?

Copy link
Contributor Author

@ViniTou ViniTou Aug 19, 2025

Choose a reason for hiding this comment

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

Yes in all cases - the button changed label but the functionality did not change - I didnt want to mess up with someone translation as we could end with translated Save and close but what we want is just Save there.

@mikadamczyk

@@ -95,8 +72,7 @@ public function createStructure(array $options): ItemInterface
public static function getTranslationMessages(): array
{
return [
(new Message(self::ITEM__SAVE, 'ibexa_menu'))->setDesc('Save'),
(new Message(self::ITEM__SAVE_AND_CLOSE, 'ibexa_menu'))->setDesc('Save and close'),
(new Message(self::ITEM__SAVE_AND_CLOSE, 'ibexa_menu'))->setDesc('Save'),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
(new Message(self::ITEM__SAVE_AND_CLOSE, 'ibexa_menu'))->setDesc('Save'),
(new Message(self::ITEM__SAVE, 'ibexa_menu'))->setDesc('Save'),

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Those are buttons IDs, that would change id associated with current behaviour, ergo could introuduce some sort of bc breaks.

* @throws \InvalidArgumentException
* @throws ApiExceptions\BadStateException
* @throws \InvalidArgumentException
*/
public function createStructure(array $options): ItemInterface
{
$saveId = $options['save_id'];
$saveAncCloseId = $options['save_and_close_id'];
$saveAndCloseId = $options['save_and_close_id'];
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it be save_and_close_id as the button is about creating?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

they are all named like this, for update as well, sometimes they are named save_and_edit, I really do not want to change all of them now. Even more that technicaly is BC break.

@ViniTou
Copy link
Contributor Author

ViniTou commented Aug 19, 2025

@mikadamczyk
In the end I dropped all translations in FormTypes as they are not used - actual button labels comes from menu builders and that just create ambiguity.

@ViniTou ViniTou requested a review from mikadamczyk August 19, 2025 10:04
@pawlakadrian pawlakadrian force-pushed the ibx-10414-drop-save-action branch from 84c281f to 498123d Compare August 21, 2025 13:38
@pawlakadrian pawlakadrian self-requested a review August 21, 2025 13:38
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
33.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Copy link

@pawlakadrian pawlakadrian left a comment

Choose a reason for hiding this comment

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

QA Approved on 5.0.x-dev

@adamwojs adamwojs merged commit 7b69b1c into main Aug 22, 2025
24 of 25 checks passed
@adamwojs adamwojs deleted the ibx-10414-drop-save-action branch August 22, 2025 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants