textpattern / pophelp

Textpattern CMS help files.
https://textpattern.com
GNU General Public License v2.0
8 stars 6 forks source link

Pophelp needed for `remove_extra_templates` #42

Closed petecooper closed 6 years ago

petecooper commented 6 years ago

Appears as an option when exporting a template.

screen shot 2018-01-08 at 15 49 01

Bloke commented 6 years ago

... or possibly not. It depends if we can find a way to handle pophelps properly from links that are made via AJAX. If you notice right now, it doesn't render the pophelp as an overlay and tries to use the old-style "new tab" popup window. This is because the AJAX handler isn't using event delegation so it only picks up pophelp topics that are on the page when it loads, not ones that are added afterwards during UI operation. Hopefully @bloatware has an idea about this, because I tried and failed to fix it!

If not, we'll just remove the pophelp icon for now on that link and worry about it in a future release.

philwareham commented 6 years ago

From my limited testing remove_extra_templates is potentially really dangerous and can delete a lot of files unintentionally if you don't understand what it is used for - therefore it's imperative that:

  1. It absolutely has a pophelp to explain it
  2. The text string wording makes it as obvious as possible that this destroys files
  3. It is unchecked by default
  4. Preferably an extra warning dialog is displayed prior to final confirmation of action
Bloke commented 6 years ago
  1. Fine by me. Must be a way to get it to work. It's just JavaScript (but above my pay grade).
  2. Yes. This requires some thought in that limited space we have down there.
  3. I agree it should be unchecked by default and retain its state once applied, via a hidden user pref. The implication being that if you know what you're doing and have checked it, you might want to continue to do so in future invocations until you decide not to. For more safety, we could always default to off, but it's going to trash (overwrite) existing content anyway.
  4. I think in the current multi-edit implementation, it's either ask for confirmation or not. Can't get it to double-check, as far as I know. It already asks if you're sure now.
petecooper commented 6 years ago

Tagging https://github.com/textpattern/textpacks/issues/249 for completeness