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

Popup: Add standalone control panel link #1193

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marcustyphoon
Copy link
Collaborator

Just an idea I had.

Description

This adds a link to the XKit Rewritten control panel that opens it in a new tab, useful for e.g. copying lots of tag bundles from XKit 7.

Obviously (to us), what this provides is a duplicate of the feature in the browser's extension preferences page to open the control panel embedded there, but a) most people don't know about that, and maybe more people will find this version, and b) Chromium's version of the embedded preference pane kinda sucks. Yes, yes, Firefox best bae etc.

Bonus points for the ability to use inspect element on the preference pane without the shadow DOM getting in the way.

Testing steps

@AprilSylph
Copy link
Owner

isn't there a method for opening the preferences pane...?

@AprilSylph
Copy link
Owner

also, this is kinda already a feature, just a hidden one:

image

@marcustyphoon
Copy link
Collaborator Author

Oh, yeah, it's certainly possible to access a non-popup version without this. All this does is add a link in a location where someone might go looking for it. (Well: a link and CSS that makes the standalone web view look fuller-sized like the Firefox extension preference view, but not ultra-stretched.)

(Also: interesting. It would—or, I guess, did—not occur to me to treat a navigation button like a link and expect it to randomly have an href to the current page. If there was still a header on the top with "XKit Control Panel" and it'd had cursor: pointer or something, I'd certainly have tried that. My method was [right click the button -> select options if in chromium; just left click if in firefox] -> right click -> view source -> edit the front of the URL off of the view source page.)

@marcustyphoon
Copy link
Collaborator Author

isn't there a method for opening the preferences pane...?

Do you mean right click the button -> options in chromium /// right click the button -> manage -> preferences in firefox?

@marcustyphoon
Copy link
Collaborator Author

Oh! You meant for the developer, gotcha. Interesting. This PR has different URL parameters for embedded vs in-a-new-tab, at the moment, but that's not really necessary.

@marcustyphoon
Copy link
Collaborator Author

marcustyphoon commented Aug 14, 2023

Drafting this because ostensibly the correct way to do it is to unify the "embedded" and "is in a browser window" modes (and maybe make the embedded banner prettier), but I cannot be bothered to figure out what this is supposed to mean at the moment:

html, main {
  width: 375px;
  min-width: 100%;
  max-width: 100%;
}

@marcustyphoon marcustyphoon marked this pull request as draft August 14, 2023 22:10
@AprilSylph
Copy link
Owner

if the popup width is controlled by the content width, the popup is 375px wide
if the popup width is controlled by something else, e.g. was inside the firefox overflow menu pre-whatever version the extensions button was added, the content width instead shrinks or grows to match the popup width

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.

None yet

2 participants