-
-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Add "Rename" Button for Preset Management with Popup Modal
Description:
We need to add a "Rename" button between the ComboBox (for selecting presets) and the "Delete" button. When clicked, this button should open a popup modal asking the user to enter a new name for the selected preset. Upon confirming, the preset's name should be updated in the object (presets.name
) and the associated file. The previous file with the old name should be deleted.
Tasks:
-
Add the "Rename" button:
- Place the "Rename" button between the ComboBox (preset selector) and the "Delete" button.
- Ensure the button is clearly labeled and fits within the existing layout.
-
Implement the popup modal:
- Create a modal that appears when the "Rename" button is clicked.
- The modal should include:
- An input field for the new preset name.
- "Confirm" and "Cancel" buttons.
- The "Confirm" button should only be enabled if the input field is not empty.
-
Handle renaming logic:
- Update the
presets.name
property with the new name when the user clicks "Confirm". - Rename the corresponding preset file to match the new name and delete the old file.
- Ensure the file renaming is done safely, checking for any name conflicts or invalid characters.
- Update the
-
Update the ComboBox selection and display:
- Refresh the ComboBox options to reflect the updated preset name.
- Maintain the current selection in the ComboBox with the new name after renaming.
-
Test the renaming functionality:
- Verify that the "Rename" button opens the modal correctly.
- Test renaming with various inputs (valid, invalid, empty, conflicting names).
- Confirm that the file is renamed correctly and the old file is deleted.
- Ensure the ComboBox updates to reflect the new name without issues.
-
Update documentation:
- Document the new "Rename" functionality.
- Update any relevant sections of the user guide to explain how to rename presets.
Acceptance Criteria:
- The "Rename" button appears between the ComboBox and "Delete" button and functions as intended.
- The popup modal asks the user for a new name, and the "Confirm" button only works when a valid name is provided.
- The preset's name is updated both in the object (
presets.name
) and the corresponding file. - The previous file is deleted after renaming.
- The ComboBox correctly displays the updated preset name.
- Documentation is updated to reflect the new feature.
Additional Context:
- The project uses ImGui, and the modal should integrate seamlessly with the existing UI.
- Ensure that renaming presets does not interfere with other functionalities like saving, loading, or deleting presets.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers