Fix expunging of old notices
[edit]On French Wikipedia, I have corrected a call to splice
: 184859486. You may want to apply the fix here as well. Ping TheDJ :) Od1n (talk) 11:35, 22 July 2021 (UTC)
- Adding the edit interface-protected notice as a courtesy. Nardog (talk) 09:38, 23 July 2021 (UTC)
- @Od1n: I'm not very familiar with that function, can you explain the difference - and more importantly the impact? I'm not aware of any problems going on? — xaosflux Talk 13:41, 23 July 2021 (UTC)
- I have applied another bugfix. This function was really broken… Od1n (talk) 16:01, 26 July 2021 (UTC)
- @Od1n: can you describe the "bug" ? — xaosflux Talk 20:51, 28 July 2021 (UTC)
- Current code is unambiguously wrong, so that the old notices are never expunged from the localStorage. I did my best to describe in the edit summaries, and the MDN docs are well written:
splice()
andin
operator. I have done other changes on the French wiki version, though the 2 diffs above are the most important ones, so that at least the code works as expected. Od1n (talk) 17:28, 29 July 2021 (UTC)
- Current code is unambiguously wrong, so that the old notices are never expunged from the localStorage. I did my best to describe in the edit summaries, and the MDN docs are well written:
- @Od1n: can you describe the "bug" ? — xaosflux Talk 20:51, 28 July 2021 (UTC)
Done @Od1n: thank you, I have applied those two fixes - a bit tricky to test this one (any intadmin should revert without consult if new issues are introduced). — xaosflux Talk 14:07, 30 July 2021 (UTC)
Make dismissButton a real button
[edit]Implement Special:Diff/1211506565/1211534077 and Special:Diff/1211506948/1213428873, which would turn the "[ dismiss ]" link button into an actual button that reads "[dismiss]". This has several benefits, such as not altering the page link, making semantic sense, and allowing the user to fully customize the button; for example, they can now remove the brackets if they want.
If spaces between the brackets (i.e. "[ dismiss ]" instead of "[dismiss]") are wanted, I could add them back, though currently they're removed due to how other bracket buttons (such as "[show]" above) don't use spaces.
This has been tested by including a version of the gadgets with my diffs applied in my common.js/css pages and looking at the watchlist, per @Xaosflux's suggestion (thanks!) Aaron Liu (talk) 23:25, 2 March 2024 (UTC)
- @Aaron Liu to verify did you then also use ?useskin and check all of the skins to make sure nothing breaks? — xaosflux Talk 00:33, 3 March 2024 (UTC)
- Yes, though I've only just now realized that Vector 2010 isn't the only legacy link color in town; the link color is out of place everywhere (especially noticeable in Minerva and Modern) except on the Vector skins, because the base color is from V10 and I added a special selector for V22. Should I add a separate color rule for each skin we currently have, or should I get the color of links by pulling the color from
getComputedStyle(document.querySelector('.mw-changeslist a:link'))
? Aaron Liu (talk) 01:29, 3 March 2024 (UTC) - @Xaosflux Done, and I've added automatic link color detection. Diff links have been updated, though you can simply copy the CSS page, and do the same for the JS page after removing the first and last line. Aaron Liu (talk) 01:50, 3 March 2024 (UTC)
- Another way would be to forget about skins and just set the link color to LinkText, a CSS "magic word" that gives you the browser/system's link color. Aaron Liu (talk) 20:48, 12 March 2024 (UTC)
- Yes, though I've only just now realized that Vector 2010 isn't the only legacy link color in town; the link color is out of place everywhere (especially noticeable in Minerva and Modern) except on the Vector skins, because the base color is from V10 and I added a special selector for V22. Should I add a separate color rule for each skin we currently have, or should I get the color of links by pulling the color from
- Hey @Xaosflux, what's the status of this? Aaron Liu (talk) 02:02, 1 June 2024 (UTC)
- Any intadmin is welcome to work on this, none of us want to break WLN's and this isn't really holding any editors or readers up from doing anything. — xaosflux Talk 15:49, 1 June 2024 (UTC)
Doing... (currently awaiting syncs). — xaosflux Talk 18:55, 5 June 2024 (UTC)
Undone this is producing inconsistent results, and the ones with buttons give more attention to the button than to the actual message (esp in timeless):
- In vector-2022, Cologne Blue, and modern you get
[dismiss]
- In vector and monobook you get
[[dismiss]]
- In minerva, you get a floating button
- In timeless, you get a very big button
- In vector-2022, Cologne Blue, and modern you get
Not done doesn't seem to be an improvement. At the very least this is BRD now, feel free to discuss further below. — xaosflux Talk 19:03, 5 June 2024 (UTC)
- I cannot reproduce these problems under safe mode and pasting links after disabling the watchlist notice gadget. Are you sure that both changes were loaded? I can only reproduce a very big button under timeless if I did not paste in the links to the CSS styles. Aaron Liu (talk) 19:45, 5 June 2024 (UTC)
- Yes indeed, and with it reverted everything went back to a fairly consistent state. Also, how would you possibly test a script while in ?safemode which disables script processing? — xaosflux Talk 23:41, 5 June 2024 (UTC)
- As I said, I pasted two "mw.loader.load" lines into the devtools console. Aaron Liu (talk) 01:24, 6 June 2024 (UTC)
- Yes indeed, and with it reverted everything went back to a fairly consistent state. Also, how would you possibly test a script while in ?safemode which disables script processing? — xaosflux Talk 23:41, 5 June 2024 (UTC)
Not done (as to the immediate edit request) -- this disputed change is under discussion above. A consensus needs to be formed to proceed. — xaosflux Talk 23:39, 5 June 2024 (UTC)
- I cannot reproduce these problems under safe mode and pasting links after disabling the watchlist notice gadget. Are you sure that both changes were loaded? I can only reproduce a very big button under timeless if I did not paste in the links to the CSS styles. Aaron Liu (talk) 19:45, 5 June 2024 (UTC)