pauloamgomes / contentful-better-slugs

The Better Slugs is a simple UI extension for Contentful CMS that provides a more enhanced way to deal with slug fields.
MIT License
30 stars 16 forks source link

Feature request: Hide reset button #9

Closed Cyberlane closed 3 years ago

Cyberlane commented 3 years ago

I really appreciate this extension, but would like to have an extra setting.

We have a lot of different content editors, and some of them have started to press the "reset" button, which causes problems for us. Could we have an extra setting to potentially hide the "reset" button?

I would be happy to attempt at making a PR for this, if you considered it a worthy feature.

pauloamgomes commented 3 years ago

Hi @Cyberlane , thanks for flagging that. That would make sense to be optional, you have now in the field settings a new option to hide the reset button.

Cyberlane commented 3 years ago

@pauloamgomes thanks for that, really appreciate it!

Sorry for the strange question, but how do I tell Contentful to update your extension to reflect this new feature? I assumed since there was no obvious "update extension" button, that perhaps it would just automatically appear, but it did not.

pauloamgomes commented 3 years ago

If on the extension settings page you have self-hosted and you use https://pauloamgomes.github.io/contentful-better-slugs/ it should auto-update, try to hard refresh the page.

On Tue, Jan 19, 2021 at 8:35 AM Justin Nel notifications@github.com wrote:

@pauloamgomes https://github.com/pauloamgomes thanks for that, really appreciate it!

Sorry for the strange question, but how do I tell Contentful to update your extension to reflect this new feature? I assumed since there was no obvious "update extension" button, that perhaps it would just automatically appear, but it did not.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pauloamgomes/contentful-better-slugs/issues/9#issuecomment-762658981, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAY65I44JPLCO4YT6FGJODS2UY35ANCNFSM4WHCWFBQ .

Cyberlane commented 3 years ago

I just noticed in the code changes you made that although your commit on #9 added the functionality, there was no UI update for that value as of yet.

However, thanks for the information regardless as I have always wondered how updates are managed for the extensions. 😀

pauloamgomes commented 3 years ago

Yeah, to update the instance settings, you need to reinstall using the command line, or remove the previous one and add it again using the UI.

Cyberlane commented 3 years ago

So currently I am using the Self-hosted with the URL you provided, but on the existing instances I am not seeing this setting on my CommonPage type's slug field.

Should I change the Appearance to Slug, Save, and then change it back to Better Slugs and save again to see the update? Or do I need to completely remove and re-install the extension to see this?

I mostly want to try avoid causing any downtime or problems for the content editors whilst doing this update. Happy to go with command line if that's the safest, but then I would like to just confirm if I am going to use that to issue some sort of re-install extension command (I would check the docs for the exact syntax) ?

pauloamgomes commented 3 years ago

Yeah, unfortunately I think the instance parameters require the extension to be reinstalled/updated, you'll require to dig in the contentful extension update command but probably would be faster you:

  1. install another instance of the extension (rename the old one)
  2. change in the appearance field to the new one (you need to do that in all content models that have a slug field)
  3. remove the old extension
Cyberlane commented 3 years ago

Worked a charm, thank you so much for your patience explaining this to me!

Any objections to me closing this issue, since you have now created the feature?

pauloamgomes commented 3 years ago

No, glad it worked. Kindly close it.