* perf: use a separate icons.svg file
This splits icons into inline and non-inline. The inline ones are high
priority; the rest go in an icons.svg file.
* create SvgIcon.html
* determine inlined svgs at build time
* fix: fix aria-posinset should be 1-based
fixes#1053
* second attempt to fix tests
* try to fix test
* fixup
* lint fix
* fix more tests
* simplify test math
I don't like clicking on a status, clicking back, and suddenly it has a
different background. The focus ring is less distracting. Unfortunately
it doesn't look right on the article element itself, so we have to apply
the style to its parent, but that's not too hard.
For reasons that are mysterious to me, #1000 works in Node v10 but not v8. And Zeit runs v8. Moving the hidden links to a different page fixes it. ¯\_(ツ)_/¯
Unfortunately it looks like `sapper export` works by crawling the
non-logged-in site, which means that any pages that are inaccessible
when you're not logged in don't get generated, including "pinned,"
"muted," "blocked," "requests," and "share."
Normally this isn't a problem, but it is in browsers that don't
have Service Worker; you get a 404 when you try to refresh those pages.
My fix is to just add a hidden div that links to these pages. It's not
pretty, but it works.
As of #998 we can no longer rely on JS files containing , let alone . This was a nice idea, but it's just not maintainable anymore nor does it provide a huge benefit.
* Cache main-nav in scrollIntoView.js.
This change avoids continuously calling document.getElementById for the
same element.
* Fix firstVisibleElementIndex to always return a dictionary.
Before this change, firstVisibleElementIndex would return -1 if it
doesn't find anything. This made no sense since this function returns a
dictionary on success.
With this change, the function always returns a dictionary with the
expected keys.
* lint fix
* Wrap LONG posts with spoilers
Some ActivityPub software facilitates long form blog posts being pushed
out onto timelines.
Some ActivityPub software have toot lengths which are much larger than
Mastodon's default of 500.
This wraps spoiler tags around those statuses.
* fix lint, extract consts
* extract consts to separate file
* fix test hopefully
* Revert "fix test hopefully"
This reverts commit 7d8e2671ad158b317f6f75a7dd5dacac9e12cf80.
* Fix failing test
* Revert "Fix failing test"
This reverts commit 15b06e11589b49979ca5eb85b7fe5c7510a62ba7.
* Revert "Revert "fix test hopefully""
This reverts commit d3776bc9d64dcfd209a307a0639d33cbe6ca3884.
* measure text after shortening URLs
* Add support for keyboard shortcuts.
This change introduces a Shortcut component for defining global
keyboard shortcuts from whichever component makes more sense.
This change also adds an initial set of navigation shortcuts:
- Backspace to leave a modal dialog or to go back
- g t to go to the federated timeline
- g f to go to the favorite page
- g h to go to the home page
- g n to go to the notification page
- g c to go to the community page
- s to go to the search page
These shortcuts are loaded asynchronously from _layout.html
In modal dialogs, shortcuts are also modal, to avoid strange or
overly complex behavior. This is implemented by grouping
shortcuts into scopes, and activating a separate 'modal' scope
when entering a modal dialog, so a separate set of shortcuts can
be enabled in modal dialog. Modal dialogs can be exited by
pressing 'Backspace'.
* Navigate up/down lists using keyboard shortcuts.
This change introduces keyboard shortcuts for navigating in lists and
virtual lists. j or arrow up selects the next element, k or arrow down,
the previous element. Selecting an element scrolls the list up and down,
as necessary.
This change also allows directing keyboard shortcuts to the active
element and defines the following shortcuts, for the active status:
- f to favorite or unfavorite it
- b to boost or unboost it
- r to reply to it
- o to open its thread
- x to toggle the display of a CW
- y to toggle the display of sensitive medias
This works by defining a keyboard shortcut scope for each list element.
A new component, ScrollListShortcuts, keeps track of the active element,
based on list or virtual list elements and redirects shortcuts to the
active element's scope. ScrollListShortcuts keeps the active element in
the current realm of the store, so the active element is restored when
going back to the list.
* Typing h or ? displays the list of available keyboard shortcuts.
This change introduces a new modal dialog that documents the list of
available shortcuts.
This gets rid of the awkward checking-in of `template.html` to git (when
it's a built file) and also makes the rebuilds faster and more
consistent by running everything through the same pipeline. So inline
CSS, SVG, and JS are all partially built on-the-fly.
I've basically reinvented gulp, but it's pretty lightweight and
zero-dep, so I'm happy with it.
* Now image and video modals width and height will fallback to "auto" instead of 300x200. Allows proper image visualization in modals when there's no attachment metadata.
* Move background-image in gifv modal to the computed property videoStyle
fixes#750
* fix: update to latest sapper
fixes#416
* fix error and debug pages
* requestIdleCallback makes column switching feel way nicer than double rAF
* add export feature
* add better csp info
* workaround for sapper sub-page issue
* clarify in readme about exporting
* fix now config
* switch from rIC to triple raf
* style-loader is no longer used
* update theming guide