github: shadowy octopus with the head of a robot, emblazoned with the Dreamwidth swirl (Default)
github ([personal profile] github) wrote in [site community profile] changelog2019-10-19 06:59 pm

[dreamwidth/dw-free] 1a2a58: [#2521] [#2522] Quick-reply: next design iteration

Branch: refs/heads/master
Home: https://github.com/dreamwidth/dw-free
Commit: 1a2a580159edc1c6031c23f0d0c1df308ae1d3ad
https://github.com/dreamwidth/dw-free/commit/1a2a580159edc1c6031c23f0d0c1df308ae1d3ad
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2019-10-19 (Sat, 19 Oct 2019)

Changed paths:
M htdocs/js/jquery.quickreply.js
M htdocs/js/jquery.replyforms.js
M htdocs/scss/components/quick-reply.scss
M views/journal/quickreply.tt

Log Message:
-----------
[#2521] [#2522] Quick-reply: next design iteration

Icon stuff:

- Consolidate "browse" buttons. There's only one now, and it's on the icon
preview. It's clearly labeled when the form first loads; the label hides
after an icon is selected, but reappears on hover.
- If you can't use the icon browser, the icon preview links to your icons page
(just like most icons do).
- Move the random icon feature to the icons menu. Easily accessible if you want
it, tidily out of the way if you don't. After the first use, it reveals a
separate "random" button (for re-rolls).

Identity stuff:

- Restore the username indicator (on top).
- Put "More options" by the identity controls.

Small stuff:

- Fix incorrect icon previews on page reloads.
- Enable iOS momentum scrolling on message body textarea. (v. 12 and earlier; in
13 it's on by default. 🙌🏼)
- Tidy up some margins and stuff.


Commit: 7f828fe012eb7492eb5232f95284583ca4ea3394
https://github.com/dreamwidth/dw-free/commit/7f828fe012eb7492eb5232f95284583ca4ea3394
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2019-10-19 (Sat, 19 Oct 2019)

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

Log Message:
-----------
[#1484] Pre-warm domain session cookie on "more options" from reading page

This is an implementation of a fix that [personal profile] alierak and [personal profile] kareila theorized in 2015,
but which wasn't feasible at the time because `fetch` either didn't exist or
barely existed.

If you don't have a "domain session cookie" for a given journal, your first
request to that domain loops through some redirects to set up the cookie. Which
is fine unless that first request is a POST, because the redirects turn it into
a GET and you'll lose the request body.

"More options" from the reading page seems to be the only situation where that
can happen, so let's just make it honk its horn before it comes around the
curve.

`fetch()`'s `'no-cors'` mode is specifically designed to let JavaScript code
warm up various kinds of caches for content that it might not have permission to
interact with, so we're using it for its intended purpose.


Compare: https://github.com/dreamwidth/dw-free/compare/7ff34b44e8bb...7f828fe012eb