Skip to content

Support Object in PreferencesPageTemplate #532

@ouuan

Description

@ouuan

Is your feature request related to a problem? Please describe.

Now we have code snippets page and the parentheses page, and will have the submit commands page (#212) soon. There will be many duplicate codes and will be hard to maintain if we don't provide a general solution.

Describe the solution you'd like

Put a list of objects in a 2-column table view, where each cell in the first column is the name of an object and each cell in the second column is a button that opens a modal pop-up page (this page is also a PreferencesPageTemplate). You can add and delete objects, rename an object, and search for an object. In the pop-up page, you can change the settings in the object. The changes applied in the pop-up page are saved in the settings, and the settings are changed in the parent page only if objects are added or deleted.

We can provide extra features in the code snippets page (export/import snippets) by subclassing PreferencesPageTemplate and adding buttons.

Describe alternatives you've considered

Just like the current code snippets page and the parentheses page, use a list widget for the names of the objects, and change each object in a widget in the right part. This only allows objects with a depth of 2, and it's hard to reuse PreferencesPageTemplate in the right part.

Additional context

Metadata

Metadata

Assignees

Labels

high_priorityHigh Priority Issues are marked with this label.preferencesSomething related to the preferencesrefactorCode changes that neither bring a new feature nor fix a bug, but are good for developing.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions