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

Add support for renaming plugin package_name #271

Closed

Conversation

dimasciput
Copy link
Collaborator

This is for #270

@Gustry
Copy link
Contributor

Gustry commented Mar 15, 2023

I'm not sure to understand, is-it a feature to update the plugin name ?

Did you try to check the behavior in QGIS desktop ?
Like :

  1. Install plugin X in QGIS desktop
  2. The plugin X is renamed to plugin Y
  3. What happen in QGIS desktop ? Does plugin Y detected as not installed ?

Sorry if it's not related and skip my comment :)

Edit :
Sorry, I just checked after writing this comment, the issue #270 ...

@dimasciput
Copy link
Collaborator Author

Hi @Gustry , sorry I should make this PR as a draft since it’s not ready to review yet.
And yes this PR is for addressing that ticket.

@Gustry
Copy link
Contributor

Gustry commented Mar 15, 2023

Ok thanks for the information. You can still press the "convert to draft" ;-)

There are few things to check indeed for allowing this ticket. I'm not sure how you want to proceed on the desktop side.

@dimasciput dimasciput marked this pull request as draft March 15, 2023 13:02
@PeterPetrik
Copy link

It would be enough for this time to keep (old) plugin identifier (directory name) and only change human readable name, likely with no changes in qgis desktop. Renaming would effectively forcing new human readable name.

Human readable name should be used in QGIS installer, and also on qgis plugin site in title of the plugin/list of plugins. Important is to now override this human readable name on new plugin version upload (as zip) - this name should be configurable ideally as plugin admin/owner in the part where you upload new plugin version. It would be even enough it it is not modifiable by user/owner , just by some super-admin (e.g. need to write mail to Tim to change the name for us)

Screenshot 2023-11-03 at 11 03 06

Thanks a lot!

@timlinux
Copy link
Member

timlinux commented Nov 4, 2023

Thanks @PeterPetrik . @Xpirix when you take over the original ticket and this PR it might be good to write up a clear design for @PeterPetrik and @Gustry to comment on before you start building stuff, taking special care to understand and document the impacts in the QGIS desktop environment.

@Xpirix
Copy link
Collaborator

Xpirix commented Nov 6, 2023

Thanks @timlinux . That is well noted.

@Xpirix
Copy link
Collaborator

Xpirix commented Nov 6, 2023

@PeterPetrik @Gustry @timlinux Please find below my understanding of the ticket and the PR.

  • Plugin Renaming:

    • Django Admin Update: the field name of the model Plugins will be editable by a Super admin
    • Plugin Version Upload: Allow the name field to be part of the form when uploading a new plugin version, enabling admins or owners to rename it during this process.
    • Renaming Without New Version: If the owner wishes to rename a plugin without uploading a new version, they can request the change from a super-admin via the admin page.
  • Impacts on Plugin Website and QGIS:

    • QGIS Plugin Site: Changing the plugin name will directly affect the plugin title both in the plugin list and on the plugin's page on the QGIS plugin site.
    • QGIS Application: The modified name will reflect in the plugin installer window in QGIS, even if the plugin is already installed. However, to view these changes, it is necessary to fetch repositories.
  • Changing the package_name :

    • It's advisable to maintain the old plugin identifier (directory name) to avoid issues.
    • When the package_name changes, QGIS might detect the plugin as not installed, potentially resulting in an error during installation.

Please feel free to comment if you have any concerns about this.

EDIT: If the maintainer uploads a new version with a non-matching name, it will raise an error. In the plugin properties page, there will be a checkbox that will allow the django admin to 'allow name in metadata.txt to update the plugin name' as mentionned in #270 . If this option is checked, the name/title of the plugin in the website and in QGIS will change depending on the value in metadata.txt.

@PeterPetrik
Copy link

Looks good to me, maybe @wonder-sk can comment too?

@wonder-sk
Copy link
Member

Looks good to me as well. I agree that it is best not to allow modification of package name (at least for now) as this would introduce issues on the client side related to the renaming and how to smoothly handle the transition.

@Xpirix
Copy link
Collaborator

Xpirix commented Nov 8, 2023

Thanks @PeterPetrik @wonder-sk . Please find below a new PR for this:

@dimasciput dimasciput closed this Nov 22, 2023
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.

6 participants