-
Notifications
You must be signed in to change notification settings - Fork 23
WIP: Core BPM changes for Discord #12
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
base: master
Are you sure you want to change the base?
WIP: Core BPM changes for Discord #12
Conversation
Regarding moving the search box off the window: I believe I have heard complaints before that it's possible to "lose" the search box in BPM by resizing the page, and similar things. The best change, not necessarily the most expedient one, may be to ensure the box generally tries to stay within the visible area. The content script is already wrapped in a giant |
I have just coded up the dragging, will add on a todo for the window resize. Note: It's specifically when resizing the window down from the right or up from the bottom. Works fine if resizing from the top or left. EDIT: ...until you resize it off the page. Okay. |
@ByzantineFailure Probably because of the way the top of the function wrapper is in a totally different file from the end of it. That confused me at first too. O.o |
Hooray for |
I think the search box dragging, window-resizing, and searchbox resizing bugs are hammered out now. |
7448e6b
to
1953924
Compare
d5ffa42
to
0ca5bdf
Compare
Question, given that this is likely to be a long-lived PR, would it be wise to split out the "Search cannot leave browser window" commit into its own PR? That one seems to be something that would benefit BPM as a whole and can stand on its own without the Discord changes. |
87c26d8
to
164946e
Compare
Oh. That would probably be good. |
164946e
to
06622e2
Compare
06622e2
to
af11746
Compare
af11746
to
f26a793
Compare
93beb4b
to
1c177e2
Compare
1c177e2
to
705e004
Compare
705e004
to
6569f1b
Compare
6569f1b
to
25050ff
Compare
25050ff
to
61878dd
Compare
61878dd
to
ac69708
Compare
ac69708
to
75fdb54
Compare
75fdb54
to
b9924e8
Compare
229c26b
to
f788b18
Compare
f788b18
to
532f17d
Compare
532f17d
to
58b3c8b
Compare
58b3c8b
to
f6179bb
Compare
f6179bb
to
fd9958a
Compare
b436d87
to
dcb9020
Compare
dcb9020
to
4a41fb4
Compare
This reverts commit cfc2c77.
Following a PM conversation with @Rothera, I'm going to try and track all BPM core changes in their own branch and keep this PR open here. The discord-specific code will be kept in a branch that will be continually rebased off of this one.
The discord-specific Makefile changes are not included here as they observe files that would not exist without the discord-specific code and will break the Makefile.
The PR as it stands does the following:
window.process
)bpm-browser.js
<a>
s with externalhref
s to havetarget="_blank"
when in running in Discord so that they open in a new browser window rather than navigating Discord's browser window.enableGlobalEmotes
andenableGlobalSearch
betrue
.module.exports
forbpm-resources.js
then if we're in an electron (Discord) context imports them as variables.locate_matching_ancestor
function when assessing if a node with text is valid for replacement.bpm-searchbox.js
so that if we're in discord clicking an emote fires a message to the discord code rather than inserting normally (this is so we always insert in the discord chat inputtextarea
)I intend to make a few more changes before considering this PR good to go:
CAVEAT EMPTOR: I have not tested any of these changes with any of the browser extension builds.