Jun. 2nd, 2020

github: shadowy octopus with the head of a robot, emblazoned with the Dreamwidth swirl (Default)
[personal profile] github
Branch: refs/heads/master
Home: https://github.com/dreamwidth/dw-free
Commit: 49206e46dab60346e481e32d5a05612c584ea395
https://github.com/dreamwidth/dw-free/commit/49206e46dab60346e481e32d5a05612c584ea395
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M bin/upgrading/deadphrases.dat
M cgi-bin/DW/Controller/Admin.pm
M cgi-bin/DW/Hooks/PrivList.pm
R htdocs/admin/memcache.bml
R htdocs/admin/memcache_view.bml
M views/admin/index.tt.text

Log Message:
-----------
remove /admin/memcache and /admin/memcache_view


Commit: 9e0014595ceff22e9ad94cf18dae17bc32290805
https://github.com/dreamwidth/dw-free/commit/9e0014595ceff22e9ad94cf18dae17bc32290805
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M bin/upgrading/deadphrases.dat
R cgi-bin/DW/Controller/Admin/StatusCheckLegacy.pm
M cgi-bin/DW/Hooks/PrivList.pm
R views/admin/clusterstatus.tt
R views/admin/clusterstatus.tt.text
R views/admin/mysql_status.tt
R views/admin/mysql_status.tt.text

Log Message:
-----------
remove /admin/clusterstatus and /admin/mysql_status


Compare: https://github.com/dreamwidth/dw-free/compare/d7ae3dde0908...9e0014595cef
github: shadowy octopus with the head of a robot, emblazoned with the Dreamwidth swirl (Default)
[personal profile] github
Branch: refs/heads/master
Home: https://github.com/dreamwidth/dw-free
Commit: b6cb8639517108e9575285234bbe201c029902ac
https://github.com/dreamwidth/dw-free/commit/b6cb8639517108e9575285234bbe201c029902ac
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/DW/Controller/Admin/Props.pm

Log Message:
-----------
don't throw Perl error when feeding admin/propedit a nonexistent user

I went to add error checking for a nonexistent user and found that it was already there, but the scope needed to be expanded to avoid the problem. Then testing revealed that the error message wasn't passed to the page for printing, so I fixed that as well.

Fixes #2530.
github: shadowy octopus with the head of a robot, emblazoned with the Dreamwidth swirl (Default)
[personal profile] github
Branch: refs/heads/master
Home: https://github.com/dreamwidth/dw-free
Commit: 061ff79f76173e8525d2c0ac432f0cd7e918c9f2
https://github.com/dreamwidth/dw-free/commit/061ff79f76173e8525d2c0ac432f0cd7e918c9f2
Author: Ruth <momijizukamori@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/DW/Request/Base.pm
M cgi-bin/DW/Template.pm
M htdocs/scss/components/foundation-custom/_alert-boxes.scss
M htdocs/scss/skins/lynx.scss
M htdocs/stc/base-colors-dark.css
M htdocs/stc/celerity/celerity.css
M htdocs/stc/gradation/gradation.css
M htdocs/stc/lj_base.css
M htdocs/stc/lynx/lynx.css
M schemes/celerity.tt
M schemes/common.tt
M schemes/global.tt
M schemes/lynx.tt

Log Message:
-----------
Add inline session messages
github: shadowy octopus with the head of a robot, emblazoned with the Dreamwidth swirl (Default)
[personal profile] github
Branch: refs/heads/master
Home: https://github.com/dreamwidth/dw-free
Commit: 7fc1ebdd0254047bfb2343500b669cad7de60e07
https://github.com/dreamwidth/dw-free/commit/7fc1ebdd0254047bfb2343500b669cad7de60e07
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M htdocs/js/jquery.imageshrink.js
M htdocs/scss/components/imageshrink.scss

Log Message:
-----------
[2650] Improved image shrinking, part three

We currently constrain the size of images in entry and comment content. But the
REASON we do this is so that people can casually post medium-sized images
and not stress about annoying their friends and readers; the beginning and end
of it is to make it easier to post on DW.

There's another set of user behaviors that's basically the OPPOSITE of casually
posting a medium image, where people express themselves by doing weird intricate
HTML shit no modern site would allow. It's part of DW's fandom-centric culture,
so we'd rather not interfere with it or make it harder.

This commit uses some extra javascript to try and guess which images are part of
a complex hunk of decorative / narrative markup, and changes the CSS to leave
said images alone (under the assumption that the author knows what they're
trying to accomplish and doesn't need any "help").

And while I'm at it, it also removes the "zoom in" cursor from images that are
already actual size and thus don't need to zoom. (That part uses an ultra-modern
API with stringent browser requirements, because 1. it's kind of just a vanity
thing, and 2. it has to update on window resize, but any tangible performance
cost is unacceptable, so if we can't do it for nearly-free then we shouldn't do
it at all. Native ResizeObserver is nearly-free, polyfills ain't.)


Commit: 128aa48726a78a3b3c1264869e4c5948df8c1164
https://github.com/dreamwidth/dw-free/commit/128aa48726a78a3b3c1264869e4c5948df8c1164
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M htdocs/scss/foundation/components/_global.scss

Log Message:
-----------
Comment out default global Foundation rules for images

These rules make too many assumptions to be compatible with this site, and in
particular they interfere badly with user-provided content. As far as I can
tell, none of the current pages rely on these CSS rules.

If we were using a viable living framework here, hacking the core files like
this would be a bad plan. But Foundation 5 is extremely end-of-life, AKA we
bought it so we might as well break it. We're already carrying patches to fix
upstream bugs that will never be addressed, so hey, what's one more.


Commit: dbc8417a3363e8cee79318f13abb00081f1bc4ba
https://github.com/dreamwidth/dw-free/commit/dbc8417a3363e8cee79318f13abb00081f1bc4ba
Author: Mark Smith <mark@qq.is>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M htdocs/js/jquery.imageshrink.js

Log Message:
-----------
Update htdocs/js/jquery.imageshrink.js

WHERE WILL THIS COMMIT END UP NOBODY KNOWS

Co-authored-by: Nick Fagerlund <nick.fagerlund@gmail.com>


Compare: https://github.com/dreamwidth/dw-free/compare/061ff79f7617...dbc8417a3363
github: shadowy octopus with the head of a robot, emblazoned with the Dreamwidth swirl (Default)
[personal profile] github
Branch: refs/heads/master
Home: https://github.com/dreamwidth/dw-free
Commit: db8ac80a4d42343cbddc5b2bf4b9e7d713454116
https://github.com/dreamwidth/dw-free/commit/db8ac80a4d42343cbddc5b2bf4b9e7d713454116
Author: Ruth <momijizukamori@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/DW/Controller/Support/Faq.pm
M htdocs/scss/skins/_compatibility-styles.scss
M htdocs/stc/faq.css
R htdocs/support/faqbrowse.bml
R htdocs/support/faqbrowse.bml.text
R htdocs/support/faqsearch.bml
R htdocs/support/faqsearch.bml.text
A views/support/faqbrowse.tt
A views/support/faqbrowse.tt.text
A views/support/faqsearch.tt
A views/support/faqsearch.tt.text

Log Message:
-----------
Convert faqsearch and faqbrowse to Foundation/TT


Commit: 444792e41e38477f9eac3cb7986d9f267f8826ac
https://github.com/dreamwidth/dw-free/commit/444792e41e38477f9eac3cb7986d9f267f8826ac
Author: Ruth <momijizukamori@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/DW/Controller/Support/Faq.pm

Log Message:
-----------
tidyall on Faq.pm


Compare: https://github.com/dreamwidth/dw-free/compare/dbc8417a3363...444792e41e38
github: shadowy octopus with the head of a robot, emblazoned with the Dreamwidth swirl (Default)
[personal profile] github
Branch: refs/heads/master
Home: https://github.com/dreamwidth/dw-free
Commit: 430ee3ee27cf672f52c78179dd23929d3946da10
https://github.com/dreamwidth/dw-free/commit/430ee3ee27cf672f52c78179dd23929d3946da10
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M bin/upgrading/en.dat
M cgi-bin/LJ/Console/Command/ChangeJournalType.pm
M cgi-bin/LJ/User/Message.pm
M t/console-changejournaltype.t

Log Message:
-----------
Fix change_journal_type console command to assign a new password

This command had been temporarily disabled because when changing a community journal to a personal journal, the old behavior was to copy both the email and password of the named community admin over to the converted journal. But the previously used method for accessing that password was recently removed in favor of better password practices, so we needed a different solution for that aspect of the change.

The modifications here are copied in part from the reset_password console command, which uses LJ::rand_chars to generate a random string and assigns that as the value of the new password, then communicates it directly to the user via email with the expectation that it will immediately be changed.

The actions taken by the change_journal_type console command are executed by the reset_email user method, which sends a message asking the user to confirm the new email address for the journal. For the case where we are also changing the password, the message sent now asks the user to both confirm the email and change the password. In the case of converting to a community, the password is silently reset to the empty string.


Commit: 9d7153bcba1d5cebf9fa6042583593a177e8e12a
https://github.com/dreamwidth/dw-free/commit/9d7153bcba1d5cebf9fa6042583593a177e8e12a
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M t/console-changejournaltype.t

Log Message:
-----------
Update test suite for change_journal_type command

- We haven't had a 'shared' journal type since before we forked.

- Check for blank password after converting to community, although this test will be a no-op once all accounts are on dversion 10.


Commit: 0e501afe9f950614065e90ae1a259e728f4bf414
https://github.com/dreamwidth/dw-free/commit/0e501afe9f950614065e90ae1a259e728f4bf414
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/LJ/Console/Command/ChangeJournalType.pm
M t/console-changejournaltype.t

Log Message:
-----------
Fix #2350

Prevent a personal account from being converted to a community if it still administers other communities.


Commit: 514ba9ca7befd4d92c16ef23d4fd4304edeb6ee5
https://github.com/dreamwidth/dw-free/commit/514ba9ca7befd4d92c16ef23d4fd4304edeb6ee5
Author: Mark Smith <mark@qq.is>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M bin/upgrading/en.dat

Log Message:
-----------
Add / after siteroot

There seem to be mixed uses here but I'm pretty sure production uses siteroot as 'https://www.dreamwidth.org' with no trailing slash?


Commit: 3f087ff1a4712ff5b9dd9fa8a452a21502c71356
https://github.com/dreamwidth/dw-free/commit/3f087ff1a4712ff5b9dd9fa8a452a21502c71356
Author: Mark Smith <mark@qq.is>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M bin/upgrading/en.dat

Log Message:
-----------
Back out my siteroot change.


Compare: https://github.com/dreamwidth/dw-free/compare/444792e41e38...3f087ff1a471
github: shadowy octopus with the head of a robot, emblazoned with the Dreamwidth swirl (Default)
[personal profile] github
Branch: refs/heads/master
Home: https://github.com/dreamwidth/dw-free
Commit: b8f64a033c78959f6a005ada2c27876f3e64e03d
https://github.com/dreamwidth/dw-free/commit/b8f64a033c78959f6a005ada2c27876f3e64e03d
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M views/error.tt

Log Message:
-----------
Use foundation resource group in error template, because why not


Commit: 8794f4c76c3294fcb0b4cbace69a1f8072f43150
https://github.com/dreamwidth/dw-free/commit/8794f4c76c3294fcb0b4cbace69a1f8072f43150
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M htdocs/mobile/login.bml
M htdocs/mobile/login.bml.text

Log Message:
-----------
Remove some antique garbage from mobile login screen


Commit: 65fc1bfa25e536066525cd20351b4a9c2a45d54c
https://github.com/dreamwidth/dw-free/commit/65fc1bfa25e536066525cd20351b4a9c2a45d54c
Author: Ruth <momijizukamori@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
A cgi-bin/DW/Controller/Talk.pm
R htdocs/talkpost_do.bml
A views/talkpost_do.tt
A views/talkpost_do.tt.text

Log Message:
-----------
Convert talkpost_do to controller/TT


Commit: 362bb33740fa3ad493aedec93b807f650ed50e19
https://github.com/dreamwidth/dw-free/commit/362bb33740fa3ad493aedec93b807f650ed50e19
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/DW/Controller/Talk.pm

Log Message:
-----------
Minor proofreading in Talk controller

hash dereferences, one .bml path name, print debugs


Commit: 6a548d2564d698f6a9f2bfc77965ab1d1e9eb552
https://github.com/dreamwidth/dw-free/commit/6a548d2564d698f6a9f2bfc77965ab1d1e9eb552
Author: Ruth <momijizukamori@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/DW/Controller/Talk.pm
M cgi-bin/LJ/Talk.pm

Log Message:
-----------
Fixed OpenID comment posting


Commit: 22c80c7ccdaca0e132d5348f12e995360864b25a
https://github.com/dreamwidth/dw-free/commit/22c80c7ccdaca0e132d5348f12e995360864b25a
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/DW/Controller/Talk.pm

Log Message:
-----------
Talk controller: Fix void context warnings in comparisons

These looked sketchy as heck. The warnings went away after cleaning them up.


Commit: b1fb7d23f8d5da2a0cc26a100f9448e53f344229
https://github.com/dreamwidth/dw-free/commit/b1fb7d23f8d5da2a0cc26a100f9448e53f344229
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/DW/Controller/Talk.pm

Log Message:
-----------
Talk controller: Render template for preview

Preview wasn't outputting at all without this.


Commit: e34e10d6b89b5397a7054b202980e87f076cb2b8
https://github.com/dreamwidth/dw-free/commit/e34e10d6b89b5397a7054b202980e87f076cb2b8
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/DW/Controller/Talk.pm

Log Message:
-----------
Talk controller: set active resource group to jquery early to fix captcha

Remember the long comment I wrote about need_res, specifically the bit about how
it's kind of sketchy to check $LJ::ACTIVE_RES_GROUP before the whole page is
finished because we don't make any guarantees about its state at any given
point? The textCAPTCHA implementation checks $LJ::ACTIVE_RES_GROUP instead of
just calling need_res, so by the time the template calls
set_active_resource_group, it's too late and we have an unusable version of the
captcha JS (legacy, not jquery or foundation).


Commit: 93cce228509da603be9c417f26489535fa6a9dcf
https://github.com/dreamwidth/dw-free/commit/93cce228509da603be9c417f26489535fa6a9dcf
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M views/talkpost_do.tt

Log Message:
-----------
talkpost_do.tt cleanups

- Fix the "double success" / "successful error" headers
- Remove chalresp_js (it's dead, dude)


Commit: 30f576cc0327fea28821f703356516c41f9e23cc
https://github.com/dreamwidth/dw-free/commit/30f576cc0327fea28821f703356516c41f9e23cc
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/LJ/Talk.pm

Log Message:
-----------
Scour inline BML from make_preview (finish 1-1 talkpost_do conversion)

Hardcoding 'hotcolor', since spellcheck's on borrowed time anyhow. Otherwise
this didn't seem to be doing anything interesting.

As of this commit, everything seems to work, and the Talk controller acts as a
1-1 conversion of the old talkpost_do.bml. There's no tests for any of this
behavior, naturally, but I ran a fairly hellish manual testing matrix before
and after the conversion:

- Currently (logged out, site login, openid login)
- Posting as (self, anon, user (one-off), user (login), openid (one-off), openid (login))
- Performing (post, preview, preview-then-post, whiff-captcha-and-fix)

For the most part, it preserved any existing bugs and didn't add any new ones.
One exception:

- Fixes #2572?! 🙌🏼


Commit: e70d371c0e70a368c0e931905b49dab79ab94556
https://github.com/dreamwidth/dw-free/commit/e70d371c0e70a368c0e931905b49dab79ab94556
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/DW/Controller/Talk.pm
M cgi-bin/LJ/S2/ReplyPage.pm
M cgi-bin/LJ/Talk.pm

Log Message:
-----------
talkform: Stop pointlessly copying "editid" to "edit"

I think this was because the old talkform function was too frightening to touch.


Commit: c3585cd8cde8374912b3d75ffdc364cb427e0d63
https://github.com/dreamwidth/dw-free/commit/c3585cd8cde8374912b3d75ffdc364cb427e0d63
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/LJ/S2.pm
M cgi-bin/LJ/Talk.pm
M cgi-bin/LJ/User/Journal.pm
M cgi-bin/LJ/Web.pm

Log Message:
-----------
User/Journal.pm: Refactor the "can't comment?" methods

These weren't what they could be, mostly to work around some slightly incoherent
behavior in S2 for conditionally printing quickreply links. So this shuffles
some things around and adds an umbrella method that checks everything (usually
what you want) and understands undef as anon.


Commit: d2fa8fc399e48c75607bdad8d42017935fc57119
https://github.com/dreamwidth/dw-free/commit/d2fa8fc399e48c75607bdad8d42017935fc57119
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M bin/upgrading/deadphrases.dat
M bin/upgrading/en.dat
M cgi-bin/DW/Controller/Talk.pm
M cgi-bin/LJ/Comment.pm
M cgi-bin/LJ/Talk.pm

Log Message:
-----------
LJ::Talk::Post::init - initial refactoring

I'm just setting the explosive charges, here.

- LJ::Talk::init looks like ancient detritus from some kind of behavior
transition that ended eons ago. Inline it.
- Delete a ton of stuff that never gets used.
- Return an LJ::Entry in 'item' instead of a one-off hashref. We were creating
like three Entry objects anyway, so let's do it ONCE and just hold onto it.
- Fix a minor spam/security hole -- we were trying to prevent unvalidated
OpenIDs from commenting in places where anons aren't allowed, but the check
was in a branch that OpenID users couldn't end up in. No one ever noticed
this, because the comment forms WERE properly blocking anon-like OIDs, but if
you edited the form in your browser's web inspector, you could get in.


Commit: 993ebbeb52dd05d88110ad220cf399a2ea69f786
https://github.com/dreamwidth/dw-free/commit/993ebbeb52dd05d88110ad220cf399a2ea69f786
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M bin/upgrading/deadphrases.dat
M cgi-bin/DW/Controller/Talk.pm
M cgi-bin/LJ/Comment.pm
M cgi-bin/LJ/Talk.pm
R htdocs/talkpost.bml.text
M views/talkpost_do.tt.text

Log Message:
-----------
LJ::T::P::i - refactor checks/munging into prepare_and_validate_comment

This moves all of LJ::Talk::Post::init's permissions / coherency / formatting
rules into a separate function, which is still long as hell but which at least
has a reasonable scope of responsibilities. It also grabs some rules that
belonged with these but had ended up in the callers instead of init, presumably
because nobody wanted to edit init.

While we're at it: Move ml strings to the new talkpost_do.tt.text. Bin the old
file and the dead strings.


Commit: cafe5c841027e4ac25d61013d93413518759269b
https://github.com/dreamwidth/dw-free/commit/cafe5c841027e4ac25d61013d93413518759269b
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/LJ/Comment.pm

Log Message:
-----------
LJ::Comment->create - use prepare_and_validate_comment instead of init

It doesn't need any of the user authentication stuff since it's receiving an
already-authenticated user from its caller (Protocol), so it can skip all that.

LJ::Talk::Post::init now has only a single caller.


Commit: 62659ce8002c7ae224e431b688ba4767299795cd
https://github.com/dreamwidth/dw-free/commit/62659ce8002c7ae224e431b688ba4767299795cd
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/LJ/Talk.pm

Log Message:
-----------
LJ::T::P::i - Refactor user lookup into authenticate_user_and_mutate_form

The form mutation was always one of the most haunted-ass pieces of init. We're
still doing a little bit of it, but mostly just so talkform can tell you've
logged in.

All of the downstream things that need the old behavior are already getting
what they need from prepare_and_validate_comment, which fakes it reliably.

LJ::Talk::Post::init now does about as little as possible.


Commit: 6c07fe7cf372a12e00dc42bdd7172565cbc40cec
https://github.com/dreamwidth/dw-free/commit/6c07fe7cf372a12e00dc42bdd7172565cbc40cec
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/LJ/Talk.pm

Log Message:
-----------
Talk: Refactor chrp validation into a function


Commit: 7faf3d52794ae1d5d51be8af58ea2f463f942366
https://github.com/dreamwidth/dw-free/commit/7faf3d52794ae1d5d51be8af58ea2f463f942366
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/DW/Controller/Talk.pm
M cgi-bin/LJ/Comment.pm
M cgi-bin/LJ/Talk.pm

Log Message:
-----------
Completely destroy LJ::Talk::Post::init

Sleep tight, you hunk of garbage. 💀

This moves all of the integration and stuff that's specific to receiving
comments from a web form into the Talk controller, which is where it seems to
properly belong. That includes authenticate_user_and_mutate_form, since it's
really just an implementation detail of those forms.


Commit: 0486399941ff86fae4207ca988cc2ce8908c8c1f
https://github.com/dreamwidth/dw-free/commit/0486399941ff86fae4207ca988cc2ce8908c8c1f
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/DW/Controller/Talk.pm
M cgi-bin/LJ/Talk.pm

Log Message:
-----------
Refactor LJ::Talk::Post::edit_comment


Commit: 9151cd86f6dcf1e46fe30bbdd90ed9e5fb0b191c
https://github.com/dreamwidth/dw-free/commit/9151cd86f6dcf1e46fe30bbdd90ed9e5fb0b191c
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/DW/Controller/Talk.pm
M cgi-bin/LJ/Comment.pm
M cgi-bin/LJ/Talk.pm
M cgi-bin/LJ/Test.pm

Log Message:
-----------
Refactor LJ::Talk::Post::post_comment


Commit: 60d9324cf5f5ccc2ab2109ad8fe67f3e65b1144d
https://github.com/dreamwidth/dw-free/commit/60d9324cf5f5ccc2ab2109ad8fe67f3e65b1144d
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/LJ/Talk.pm

Log Message:
-----------
prepare_and_validate_comment: Stop setting usertype

Purging some lingering taint of LJ::Talk::Post::init. Downstream functions now
check for this information in a less demented way.


Commit: de8ce76a3b48338c1dac528f99da5a1032a3bc9f
https://github.com/dreamwidth/dw-free/commit/de8ce76a3b48338c1dac528f99da5a1032a3bc9f
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/DW/Controller/Talk.pm
M views/talkpost_do.tt.text

Log Message:
-----------
Re-refactor authenticate_user_and_mutate_form, clean up controller

- Make the return signature of the auth function easier to wrangle with.
- Don't need to do that delayed form_auth check since we're not in BML anymore;
the controller handles it for us, and it should be perfectly fine with the
timing of things like the openID check.
- Fix some ml strings.


Commit: 788385fb6f55e96a3cf057c4bccd3ca796fd6e73
https://github.com/dreamwidth/dw-free/commit/788385fb6f55e96a3cf057c4bccd3ca796fd6e73
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/DW/Controller/Talk.pm

Log Message:
-----------
Bring talkpost_do into the s2foundation beta

Just switching the resource group based on whether a user is in the beta.

I'm doing this now even though it's conceptually last, because it lets me rip
some hacks out of the comment forms while I'm doing some unrelated cleanups in
them. I'm assuming this would make the preview form into an unbelievable mess,
but I never actually tried that because by this point I was Super Done with
make_preview's intractable bugginess.


Commit: c002675e6ab4ffe10a913b97255b89609370e14d
https://github.com/dreamwidth/dw-free/commit/c002675e6ab4ffe10a913b97255b89609370e14d
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M bin/upgrading/deadphrases.dat
M bin/upgrading/en.dat
M cgi-bin/DW/Controller/Talk.pm
M cgi-bin/LJ/S2/ReplyPage.pm
M cgi-bin/LJ/Talk.pm
M cgi-bin/LJ/Web.pm
M views/journal/talkform.tt

Log Message:
-----------
Some maintenance work on the reply forms

A fair bit going on in here, but it's all miscellaneous.

- Removing spellcheck from the talkform, since I'm about to rebuild preview.

- If the form was submitted with a username and password and we need to display
the same form again, we now pre-fill the password so you don't need to re-type
it. This makes the new preview behavior feel much more humane. It felt a little
squirrelly at first, but it's going over HTTPS anyway, and the "someone goes to
your computer as soon as you stand up" threat model has bigger fish to fry.

If you submitted a WRONG password, we don't pre-fill that. That's handled by
authenticate_user_and_mutate_form.

- Now that talkpost_do isn't perma-locked to the jquery resource group, we can
display the new talkform on it. That means we don't have to sniff around at
$LJ::ACTIVE_RES_GROUP anymore! (The only reason we were doing that was because
the new talkform looked wack on talkpost_do.) Knocking that out of the QR too,
while I'm at it.

- Leaving some breadcrumbs behind for the next person, with the stuff I learned
recently about the various ID formats.

- Rearranging some stuff for legibility.

- Make talkform call LJ::get_remote instead of having $remote passed in. The
behavior of the "from" options interacts directly with the global login state,
so you'll never want to override $remote with something fake.

- Heyyyy, we don't need to deal with LJ::Talk::Post::init vandalizing the
usertype field anymore!!! (The new auth function does still munge usertype, but
it does it to accurately reflect how the login state has changed since the form
was submitted. Init would just straight-up lie to me.)


Commit: 0c5500cb32e5df3ffadcbc24b877294281e29e94
https://github.com/dreamwidth/dw-free/commit/0c5500cb32e5df3ffadcbc24b877294281e29e94
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/LJ/User/Account.pm

Log Message:
-----------
Update one comment in LJ/User/Account.pm


Commit: cc2318d3bfa252fda3753d7ca4996a9aeb43ed78
https://github.com/dreamwidth/dw-free/commit/cc2318d3bfa252fda3753d7ca4996a9aeb43ed78
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
A t/talkpost-authenticate-user.t

Log Message:
-----------
Tests: authenticate_user_and_mutate_form

I would have liked to have more of these, but unsurprisingly, those global
application state mutations are really unreliable in a test environment.


Commit: 9623842c36016741c53276cf29ec71690a8bf286
https://github.com/dreamwidth/dw-free/commit/9623842c36016741c53276cf29ec71690a8bf286
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
A t/talkpost-validate-comment.t

Log Message:
-----------
Tests: LJ::Talk::Post::prepare_and_validate_comment

It looks like this function is fairly testable! The only real barrier
to expanding this is tedium.


Commit: bd5042685cded6294d79f54cedd7c0c45721c83e
https://github.com/dreamwidth/dw-free/commit/bd5042685cded6294d79f54cedd7c0c45721c83e
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/DW/Controller/Talk.pm
M cgi-bin/LJ/Talk.pm
R htdocs/js/jquery.commentpreview.js
M views/talkpost_do.tt
A views/talkpost_do/preview_comment.tt
A views/talkpost_do/preview_parent.tt

Log Message:
-----------
Reimplement comment preview from scratch

LJ::Talk::Post::make_preview is unfixable. But the desired behavior isn't
complicated, so let's just huck it and replace it with a dumb template.

Ground rules:

- No new CSS.
- No loading components that aren't in LJ::Talk::init_s2journal_js.

Kinda wanted to fake up the inputs and call directly into the siteviews S2 code,
but nah. That siteviews markup structure is EXTREMELY STABLE, so we're better
off just mimicking enough of it for the off-the-shelf CSS to take effect.

This DOES change one notable behavior: Old preview deferred captcha and auth
by carrying it over as hidden inputs in its mutant reply form. New preview
validates the comment first, which consumes the captcha response. So if a
captcha is required, you need to do it when you submit for real, instead of
relying on one you previously did.

That mildly sucks, but only mildly:

- Preview's chill with errors, so you can ignore the captcha at first and only
fill it once you're done. (A little less intuitive, tho.)
- reCAPTCHAs expire in like two minutes anyway, right? You were totally getting
double-checked before anyway.

And hey, look what the new preview buys us:

- It reports errors, which you can fix WHILE you edit your comment text. Old
preview would act like things were fine, then Nope you on submit.
- The preview LOOKS like it's from the correct user, including userpic. (Old
preview said "anonymous" if it got confused, which was often.)
- If you picked an alt and chose "log in," you're fully logged in when the
preview loads. You can even pick one of your alt's icons during edits!
- (Beta) Not a hot mess on mobile.


Commit: 3310a44f6b2316ed7185f23bbba66cc76231529e
https://github.com/dreamwidth/dw-free/commit/3310a44f6b2316ed7185f23bbba66cc76231529e
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
A t/ban-observer-effect.t

Log Message:
-----------
Add test testing our ability to test relationship changes

This workaround is used in some existing tests, like vgift-trans.t, but I
couldn't find an explanation, so it seems reasonable to leave behind a test
whose name will likely draw the attention of whoever hits this next.


Commit: bc39f6d04ac8b570315d315276e2e68df42fe510
https://github.com/dreamwidth/dw-free/commit/bc39f6d04ac8b570315d315276e2e68df42fe510
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/LJ/Talk.pm

Log Message:
-----------
Update some comments about icon browser


Commit: ec7c9e9c749db979a8d9d918e61628a9c30bb88d
https://github.com/dreamwidth/dw-free/commit/ec7c9e9c749db979a8d9d918e61628a9c30bb88d
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M bin/upgrading/deadphrases.dat
R htdocs/talkpost_do.bml.text

Log Message:
-----------
Remove talkpost_do.bml.text, add to deadphrases


Commit: 2ae0baf793ec2693a408a41767d010d0e5ac0783
https://github.com/dreamwidth/dw-free/commit/2ae0baf793ec2693a408a41767d010d0e5ac0783
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/DW/Controller/Talk.pm
M cgi-bin/LJ/Comment.pm
M cgi-bin/LJ/S2.pm
M cgi-bin/LJ/S2/ReplyPage.pm
M cgi-bin/LJ/Talk.pm
M cgi-bin/LJ/Test.pm
M t/talkpost-authenticate-user.t
M t/talkpost-validate-comment.t

Log Message:
-----------
Tidy the universe


Commit: 12d615ed1e5e246cc6b4ca1755cfa854c55a73ca
https://github.com/dreamwidth/dw-free/commit/12d615ed1e5e246cc6b4ca1755cfa854c55a73ca
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/DW/Controller/Talk.pm
M cgi-bin/LJ/S2/DayPage.pm
M cgi-bin/LJ/S2/EntryPage.pm
M cgi-bin/LJ/S2/FriendsPage.pm
M cgi-bin/LJ/S2/RecentPage.pm
M cgi-bin/LJ/Talk.pm

Log Message:
-----------
init_s2journal_js: check the remote for iconbrowser permissions

Everything that ever calls this function passes the exact same
`$remote && $remote->can_use_userpic_select` value for $opts{iconbrowser}, and I
don't think there's any use case for checking against a user OTHER than the
currently logged-in one. So we might as well just change that argument to mean
"the iconbrowser is usable here," and move the permissions check into the
convenience function.

(The call in the Talk controller was currently using stale info. I was about to
change it to check $real_remote, but on further thought why not just make the
function better.)


Commit: 18fb2384aa4e49916ef874f15ae85fb1b2fbf0d8
https://github.com/dreamwidth/dw-free/commit/18fb2384aa4e49916ef874f15ae85fb1b2fbf0d8
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/DW/Controller/Talk.pm

Log Message:
-----------
"I'm OpenID" + "here's a username" is incoherent

Hey hey, one of the first payoffs for making that function stupider and more
obvious! The old implementation didn't check for this either, but no one ever
spotted it.


Commit: 8af150321c87533ff84482921c4c35a32369757d
https://github.com/dreamwidth/dw-free/commit/8af150321c87533ff84482921c4c35a32369757d
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/LJ/S2.pm
M cgi-bin/LJ/Talk.pm

Log Message:
-----------
Move some journal content CSS/JS into init_s2journal_js

S2.pm was globally need_ressing a few JS/CSS files that aren't relevant for some
S2 pages (tags/icons/month/year), but ARE relevant for most pages that display
entry or comment content (including the new preview). Every page that displays
journal content calls init_s2journal_js (or at least they SHOULD), so that seems
like the natural place for these.


Commit: 262ab03fa41ffa3cc0941644ce373c12ecff1e41
https://github.com/dreamwidth/dw-free/commit/262ab03fa41ffa3cc0941644ce373c12ecff1e41
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-06-02 (Tue, 02 Jun 2020)

Changed paths:
M cgi-bin/LJ/Talk.pm

Log Message:
-----------
Fix a comment


Compare: https://github.com/dreamwidth/dw-free/compare/3f087ff1a471...262ab03fa41f
github: shadowy octopus with the head of a robot, emblazoned with the Dreamwidth swirl (Default)
[personal profile] github
Branch: refs/heads/master
Home: https://github.com/dreamwidth/dw-nonfree
Commit: 8bd0cac8ef76b2bd2ee62b6c35c849d9ab3b317f
https://github.com/dreamwidth/dw-nonfree/commit/8bd0cac8ef76b2bd2ee62b6c35c849d9ab3b317f
Author: Ruth <momijizukamori@gmail.com>
Date: 2020-05-23 (Sat, 23 May 2020)

Changed paths:
M htdocs/stc/tropo/tropo-base.css
M schemes/tropo-common.tt

Log Message:
-----------
Add styling and block for session messages


Commit: 905d412afad3c3db0fe0b6eb3c0cfd56627628dc
https://github.com/dreamwidth/dw-nonfree/commit/905d412afad3c3db0fe0b6eb3c0cfd56627628dc
Author: Jen <kareila@dreamwidth.org>
Date: 2020-06-03 (Wed, 03 Jun 2020)

Changed paths:
M htdocs/stc/tropo/tropo-base.css
M schemes/tropo-common.tt

Log Message:
-----------
Merge pull request #133 from rshatch/message-flashing

Add styling and block for session messages


Compare: https://github.com/dreamwidth/dw-nonfree/compare/27fa27c0aad6...905d412afad3
github: shadowy octopus with the head of a robot, emblazoned with the Dreamwidth swirl (Default)
[personal profile] github
Branch: refs/heads/master
Home: https://github.com/dreamwidth/dw-nonfree
Commit: 709f3dd90ea4ed4d0285cb1df49fb66cf38bf6e5
https://github.com/dreamwidth/dw-nonfree/commit/709f3dd90ea4ed4d0285cb1df49fb66cf38bf6e5
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-05-25 (Mon, 25 May 2020)

Changed paths:
M htdocs/index.bml.text.local

Log Message:
-----------
remove deadphrased string from index.bml.text.local

It was getting re-added and re-removed every time I ran texttool.pl.


Commit: 0d25a2860f10b3d3c05921d2d7d5f1091418c02a
https://github.com/dreamwidth/dw-nonfree/commit/0d25a2860f10b3d3c05921d2d7d5f1091418c02a
Author: Jen <kareila@dreamwidth.org>
Date: 2020-06-03 (Wed, 03 Jun 2020)

Changed paths:
M htdocs/index.bml.text.local

Log Message:
-----------
Merge pull request #134 from kareila/create.paymentlink

remove deadphrased string from index.bml.text.local


Compare: https://github.com/dreamwidth/dw-nonfree/compare/905d412afad3...0d25a2860f10

Profile

Dreamwidth Changelog

August 2025

S M T W T F S
     12
3456789
10111213141516
171819202122 23
2425262728 29 30
31      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 10th, 2025 02:07 am
Powered by Dreamwidth Studios