XKit-Rewritten icon indicating copy to clipboard operation
XKit-Rewritten copied to clipboard

Quick Tags: Implement New XKit migration

Open marcustyphoon opened this issue 2 years ago • 3 comments

Description

Along with https://github.com/new-xkit/XKit/pull/2135, this is one way of implementing a button that migrates data from New XKit to XKit Rewritten when pressed. It communicates via custom events from one extension's content script to the other.

Testing steps

  • Load the corresponding New XKit PR, e.g. via the XKit editor.
  • Create at least one unique New XKit tag bundle.
  • Enable Quick Tags in XKit Rewritten.
  • Press the button in the New XKit Quick Tags settings pane. Confirm that the tag bundle appears in XKit Rewritten.

marcustyphoon avatar Sep 12 '23 23:09 marcustyphoon

Hm—now that I think about it, the success UI could be from XKit Rewritten and the failure UI could be from New XKit. No reason to do two prompts in a row.

marcustyphoon avatar Sep 13 '23 07:09 marcustyphoon

The New XKit control panel has z-index: 21474836.

This is, you know. This is cool.

marcustyphoon avatar Sep 13 '23 08:09 marcustyphoon

Worth noting that: a) Maybe we could do something more general—button in New XKit that shoves over everything? That may not be ideal, though (if we add more stuff that can be imported later, that's a mess. b) Maybe we could make the handler not inside the Quick Tags script itself, so that it could set Quick Tags to enabled when the user confirmed this import? That would be convenient for the "I am migrating from New XKit to this new thing" workflow, especially if we had more scripts with export functionality.

marcustyphoon avatar Sep 13 '23 08:09 marcustyphoon

Any idea how to make a ul look good in otherwise-centered text?

marcustyphoon avatar Apr 29 '24 17:04 marcustyphoon

Hmm, don't we have styles for <table> elements in modals already? A single-column table would also serve as a fairly good list, I think.

AprilSylph avatar Apr 29 '24 22:04 AprilSylph

Nevermind. I completely misremembered what our modal table styles looked like. Maybe not.

AprilSylph avatar Apr 29 '24 22:04 AprilSylph

uhhh something something text-align: left; display: inline-block; margin: 0 auto;...?

I might need to play with it myself.

AprilSylph avatar Apr 29 '24 22:04 AprilSylph

idea: ignore case/order in duplicate checking logic

edit: Nah, not worth it. People can deduplicate the things themselves.

marcustyphoon avatar Apr 30 '24 20:04 marcustyphoon

Pushed some styles for lists within modals so that the entire element is shrunk and centred as possible, with the text within being left-aligned. Pretty happy with the result:

Narrowest Middling Wrapping
Screen Shot 2024-05-06 at 15 07 36 Screen Shot 2024-05-06 at 15 07 03 Screen Shot 2024-05-06 at 15 06 44

(No, this list isn't actually generated by the Quick Tags code, I just modified a Limit Checker modal to avoid needing to install New XKit again. Hence the lack of Cancel/Confirm buttons. Sorry.)

AprilSylph avatar May 06 '24 14:05 AprilSylph

Every single time I check if this is off-center, and every single time it's correct. Maybe we should set a minimum width on the buttons so the gap between them centers in this case :D

marcustyphoon avatar May 06 '24 15:05 marcustyphoon