Fixes#13536
- Expanding a paused video doesn't autoplay anymore
- Default volume level for the expanded video inherited from the original video
Position/playing state/volume are carried over from the original video player
to the modal, but they're not reported back to the modal as it would require
deeper changes.
This commit redesign the polls and increases characters limit for the
options from 25 to 50 characters, giving pollsters more freedom.
Summarizing, the redesign is making the polls more adaptive for upcoming
changes to the options characters limit: the bar, or a "chart", is now
displayed separately from the option itself; vote check mark is moved
next to the option text, making the percentages take less space. Option
lengths are taken into account and text is wrapped to multiple lines
if necessary to avoid overflow.
* Make the area to the left “Show Thread” also expand the toot in Web UI
* Clicking the left part of a conversation with the avatars now opens it in Web UI
* Return last_status_at as date, not datetime
* Fix relative timestamp for dates when delay is inferior to 1 day
* Also fix public directory
* Fix error when last_status_at isn't set
Change `all_day` to be a visual client-side cue only
Publish immediately if `scheduled_at` is in the past
Add `published_at` and `updated_at` to announcements JSON
* Add announcements
Fix#11006
* Add reactions to announcements
* Add admin UI for announcements
* Add unit tests
* Fix issues
- Add `with_dismissed` param to announcements API
- Fix end date not being formatted when time range is given
- Fix announcement delete causing reactions to send streaming updates
- Fix announcements container growing too wide and mascot too small
- Fix `all_day` being settable when no time range is given
- Change text "Update" to "Announcement"
* Fix scheduler unpublishing announcements before they are due
* Fix filter params not being passed to announcements filter
Also:
- Fix Mastodon logo not showing up in status embeds
- Fix blurhash not being used in status embeds
- Fix blurhash not being used in admin UI
- Fix autoplay param not working correctly on status embeds
* Revert "persist last-intersected status update and restore when ScrollableList is restored"
This reverts commit 07e26142ef6a8e74bd2ac5e9b461a5a1699bd4c8.
accidentally merged spurious code in https://github.com/tootsuite/mastodon/pull/12661. https://github.com/tootsuite/mastodon/pull/12735 removes the slowdown that this code was trying to solve; and other functionality successfully restores the view state of the list
* Revert "cache currently-viewing status id to avoid calling redux with identical value"
This reverts commit c93df2159fbd3888a5c48d8a8b8ae61dbbc54b89.
accidentally merged spurious code in https://github.com/tootsuite/mastodon/pull/12661. https://github.com/tootsuite/mastodon/pull/12735 removes the slowdown that this code was trying to solve; and other functionality successfully restores the view state of the list
* Summary: fix slowness due to layout thrashing when reloading a large set of status updates
in order to limit the maximum size of a status in a list view (e.g. the home timeline), so as to avoid having to scroll all the way through an abnormally large status update (see https://github.com/tootsuite/mastodon/pull/8205), the following steps are taken:
•the element containing the status is rendered in the browser
•its height is calculated, to determine if it exceeds the maximum height threshold.
Unfortunately for performance, these steps are carried out in the componentDidMount(/Update) method, which also performs style modifications on the element. The combination of height request and style modification during javascript evaluation in the browser leads to layout-thrashing, where the elements are repeatedly re-laid-out (see https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing & https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Performance_best_practices_for_Firefox_fe_engineers).
The solution implemented here is to memoize the collapsed state in Redux the first time the status is seen (e.g. when fetched as part of a small batch, to populate the home timeline) , so that on subsequent re-renders, the value can be queried, rather than recalculated. This strategy is derived from https://github.com/tootsuite/mastodon/pull/4439 & https://github.com/tootsuite/mastodon/pull/4909, and should resolve https://github.com/tootsuite/mastodon/issues/12455.
Andrew Lin (https://github.com/onethreeseven) is thanked for his assistance in root cause analysis and solution brainstorming
* remove getSnapshotBeforeUpdate from status
* remove componentWillUnmount from status
* persist last-intersected status update and restore when ScrollableList is restored
e.g. when navigating from home-timeline to a status conversational thread and <Back again
* cache currently-viewing status id to avoid calling redux with identical value
* refactor collapse toggle to pass explicit boolean
* Fix poll options not being selectable via keyboard
Fixes#12384
* Improve styling of poll option checkboxes/radio buttons
* Use more appropriate ARIA roles for poll options
* Allow switching between single and multiple choice from keyboard
* Coding style
* Avoid using .bind()
* Fix lost focus after modal closes
Regression caused by the use of the wicg-inert polyfill
* Fix regression introduced by wicg-inert
* Catch errors to please CodeClimate
* Add backend support for bookmarks
Bookmarks behave like favourites, except they aren't shared with other
users and do not have an associated counter.
* Add spec for bookmark endpoints
* Add front-end support for bookmarks
* Introduce OAuth scopes for bookmarks
* Add bookmarks to archive takeout
* Fix migration
* Coding style fixes
* Fix rebase issue
* Update bookmarked_statuses to latest UI changes
* Update bookmark actions to properly reflect status changes in state
* Add bookmarks item to single-column layout
* Make active bookmarks red
Fetching statuses from all followed accounts at once takes too long
within Postgres. Fetching them one by one and merging in Ruby
could be a lot less resource-intensive
Because the query for dynamically fetching the home timeline is so
heavy, we can no longer offer it when the home timeline is missing
* Add voters count to polls
* Add ActivityPub serialization and parsing of voters count
* Add support for voters count in WebUI
* Move incrementation of voters count out of redis lock
* Reword “voters” to “people”
* Fix weird scroll-jumping behavior with pending items
* Treat pending items as unread items
* Fix scroll position being altered because of the “X new items” button
* Fix expiring polls not being displayed as such in the WebUI
* Reset expiration state and timer when a poll changes
* Refactor timer logic in `_setupTimer`, only set expiration if props have changed
* Refactor and do not use deprecated React lifecycles
* Fix more visual issues with the audio player
- Add horizontal baseline in the middle of waveform
- Fix audio player colors in light theme
- Use audio element instead of web audio API
- Do not render any bars until the file is loaded
- Do not allow interactions with waveform until the file is loaded
* Fix code style issue
* Restore hashtag suggestions from local tag history
* Append local hashtag suggestions instead of prepending them
* Do not display inaccurate usage statistics for hashtags not retrieved from API
* Fixup
* Fix “read more” button behing hidden (regression from #11404)
This has the side-effect of putting the “Read more” button below possibly
trunctated polls instead of putting the poll below the “Read more”
* Remove dead code
- Focus first item when activated via keyboard
- When the dropdown menu closes, give back the focus to
the actual element which was focused prior to opening the menu
* Trap tab in privacy dropdown
* Give focus back to last focused element when privacy dropdown menu closes
* Actually give back focus to the element that had it before clicking the dropdown
* Allow selecting menu items with the space bar in status dropdown menus
* Fix modals opened by keyboard navigation being immediately closed
* Fix menu items triggering modal actions
* Add Tab trapping inside dropdown menu
* Give focus back to last focused element when status dropdown menu closes
* [WiP] Show host for “misleading” links
* Disallow misleading targets which domain names are prefixes of link text
* Move decodeIDNA to app/javascript/mastodon/utils
* Add support for international domain names
* Change link origin tag color to darker text color
* Handle links to domains starting with www. as shortened by Mastodon
* [WiP] Ignore links that cannot be misread as URLs, rewrite other links
* Play animated custom emoji on hover in status
* Play animated custom emoji on hover in display names
* Play animated custom emoji on hover in bios/bio fields
* Add support for animation on hover on public pages emojis too
* Fix tests
* Code style cleanup
* Added logout to dropdown menu
* Triggering build-and-test with empty commit as it seems it failed due to some internal failure
* Looks fine, ready to review
* Added changes from review
* method can be null without any problems
* Also target can be null
* Add audio uploads
Fix#4827
Accept uploads of OGG, WAV, FLAC, OPUS and MP3 files, and converts
them to OGG. Media attachments get a new `audio` type. In the UI,
audio uploads are displayed identically to video uploads.
* Improve code style
* Put poll options behind CWs in WebUI
* Put polls behind CWs on public pages
* Add poll icon to public pages CWs
* Revert to not showing an icon in the CW button
* Fix poll visibility on public pages
* Revert "Fix poll visibility on public pages"
This reverts commit 54a9608add6f855bc6337fe3c65eaee7ba13db49.
* Revert "Change poll options to alphabetic letters when status text is hidden"
This reverts commit c53d67326201b2061990b1874a3547c3647f50d2.
* Fix null error in status component when determining showMedia state
Also update the showMedia value if the status passed to the
component changes
* Refactor media visibility computation into a defaultMediaVisibility function
* Fix default media visibility with reblogs
* Improvements to the single column layout
- Add follows and followers link to the right panel
- Increase margins around separators in right panel
- Add follow requests link with counter when account is locked to right panel
* Redirect from getting started to home when navigation panel is visible
* Add responsive panels to the single-column layout
* Fixes
* Fix not being able to save the preference
* Fix code style issues
* Set max-height on the compose textarea and add a link to relationship manager
* Move TabsBar rendering logic from CSS to the ColumnsArea component
* Add forceSingleColumn mode
* Add unread notifications counter to tabs bar
* Add toggle to control `forceSingleColumn`
* Increase paddings in mobile layout responsively at large sizes
* Refactor selectComposeSuggestion so that different paths can be updated
* Add suggestions in CW field
* Add emoji suggestion to poll options
* Attempt to fix CSS
* Hide suggestions by default
They will be enabled if the input has focus
- 3 items per row instead of 2
- Use blurhash for previews
- Animate/hover-to-play GIFs and videos
- Open media modal instead of opening status
- Allow opening status instead with ctrl+click and open in new tab
* Add blurhash
* Use fallback color for spoiler when blurhash missing
* Federate the blurhash and accept it as long as it's at most 5x5
* Display unknown media attachments as blurhash placeholders
* Improve style of embed actions and spoiler button
* Change blurhash resolution from 3x3 to 4x4
* Improve dependency definitions
* Fix code style issues
* Backend changes for custom emoji support in poll options
* Serialize poll emojis in REST API
* Render custom emojis in poll options
* Render custom emoji in poll options on public pages
* Do not crash the whole UI when loading an invalid column
* Add error boundary component to catch Web UI crashes
* Add stack trace on supported browsers
* Add component stack info, pre-format everything for github
* Make “Reload” a clickable link that calls window.location.reload()
* Remove elephant friend from error boundary, make title stand out more
* Simplify error boundary to only a graphic
* Fix ActivityPub poll results being serialized even with hide_totals
* Fix poll refresh button having a different font size
* Display poll in OpenGraph description
* Fix NoMethodError when serializing votes
Regression from #10158
* Fix polls on public pages being broken for non-logged-in users
* Do not show time remaining if poll has no expiration date
* Allow unselecting choices in multiple choice polls
* Properly disable checkboxes/radio buttons for polls in public pages
* Visually differentiate checkboxes and radio buttons
* Add polls
Fix#1629
* Add tests
* Fixes
* Change API for creating polls
* Use name instead of content for votes
* Remove poll validation for remote polls
* Add polls to public pages
* When updating the poll, update options just in case they were changed
* Fix public pages showing both poll and other media
* Avoid two-step rendering of statuses as much as possible
Cache width shared by Video player, MediaGallery and Cards at the
ScrollableList level, pass it down through StatusList and Notifications.
* Adjust scroll when new preview cards appear
* Adjust scroll when statuses above the current scroll position are deleted
IntersectionObserverArticle is made to save on RAM by avoiding fully rendering
items that are far out of view. However, it did not work for items spawned
outside the intersection observer.
* Refactor uses of icons to an Icon component in web UI
* Refactor options passed to the Icon component
* Make tests work with absolute component paths
Currently, middle-clicking on a hashtag search result will open a new
instance of the WebUI, which is inconsistent with middle-clicking on
an account result, or a hashtag in a toot.
* Allow to show a specific status in the admin interface
* Let the front-end know the current account is a moderator
* Add admin links to status and account menus
If the current logged-in user is an admin, add quick links to the admin
interface in account and toot dropdown menu. Suggestion by @ashkitten
* Use @statuses.first instead of @statuses[0]
The modal-handling code gives back focus to the element focused when the
modal opened. However, in the case of reply confirmation, it would do so
*after* the composer code itself requested focus.
* Always use the scrollable class for the ScrollList component
Fixes#9499 as well as empty timelines' scrollbar “blinking”
between loading state and empty state.
* Do not display empty message when the list is known to have more elements
Fixes#9500
* Fix LoadMore usage in account media gallery
(Even though that codepath is probably never actually used…)
* Make account media gallery more consistent with account timeline
Fixes#9498
Display “load more” more consistently, add a loading indicator on first load.
* Fix “load more” button when no data has been fetched
So that opening a profile feels faster. Also, pinned toots are not
shown before other toots have loaded. Also, if no toots are loaded,
added empty message
- Use object properties rather than component state for
mouseMovedRecently and scrollToTopOnMouseIdle flags
- Remove redundant scrollToTop prop call, also fixing an attempt to call
an undefined prop.
Fixes#9217
- On recent mouse movement, hold timeline position so statuses remain in
place for interactions in progress.
- If the timeline had been scrolled to the top before mouse movement,
restore scroll on mouse idle.
Reminder: Suggestions were added in #7918 and are based on who you
interact with who you do not follow. E.g. if you boost someone a lot
from seeing other people's boosts of that person, it makes sense you
might be interested in following the original source; or if you reply
to someone a lot, maybe you'd want to follow them
Each suggestion can be dismissed
* Add conversations API
* Add web UI for conversations
* Add test for conversations API
* Add tests for ConversationAccount
* Improve web UI
* Rename ConversationAccount to AccountConversation
* Remove conversations on block and mute
* Change last_status_id to be a denormalization of status_ids
* Add optimistic locking
* Revert "Fix some icon names changed by the Font Awesome 5. (#8796)"
This reverts commit 3f9ec3de82.
* Revert "Migrate to font-awesome 5.0. (#8799)"
This reverts commit 8bae14591b.
* Revert "Fix some icons names, unavailable in fontawesome5 (free license). (#8792)"
This reverts commit b9c727a945.
* Revert "Update the icon name changed by the Font Awesome 5. (#8776)"
This reverts commit 17af4d27da.
* Revert "Add bot icon to bot avatars and migrate to newer version of Font Awesome (#8484)"
This reverts commit 4b794e134d.
* Make dropdown animations respect their placement
Also fix the corner radius on the privacy dropdown button when using top placement
* Fix code style issue
This includes clicks on hashtags, mentions, display names and media in the
timeline; and usernames in reply-indicator, detailed status, and the boost
modal.
* Add keyword filtering
GET|POST /api/v1/filters
GET|PUT|DELETE /api/v1/filters/:id
- Irreversible filters can drop toots from home or notifications
- Other filters can hide toots through the client app
- Filters use a phrase valid in particular contexts, expiration
* Make sure expired filters don't get applied client-side
* Add missing API methods
* Remove "regex filter" from column settings
* Add tests
* Add test for FeedManager
* Add CustomFilter test
* Add UI for managing filters
* Add streaming API event to allow syncing filters
* Fix tests
* Remove Collapsable and use CSS instead
* Put the CW field between the toot we are replying to and the toot field
* Use same spacing between all fields in the composing column
* Adjust footer of getting started column
- Improved style
- Moved hotkeys, about this instance and logout to footer
- Removed FAQ, User Guide, Apps links
- Use hamburger icon for the column
* Add edit profile action button to profile and more to dropdown
* Add "Trending now" to getting started column
* Add preferences/security links on mobile layout
* Revert "Do not re-position scroll when loading more (inserting items from below) (#7344)"
This reverts commit 8c601b54cc.
* Revert "Prevent timeline from moving when cursor is hovering over it (fixes#7278) (#7327)"
This reverts commit 58852695c8.
* Mark currently selected privacy setting in privacy dropdown
* Prevent Enter keypresses from triggering dropdown display toggle twice
* Give focus to first/selected item of dropdown menus
* Implement keyboard navigation in privacy dropdown
* Implement keyboard navigation in generic dropdown menus
KeyboardEvent.key may be physical key name (Escape, Tab, etc.)
even in text composition and it causes hotkeys or suggestion selection.
So we need to check e.which or e.isComposing.
Checking e.which also allows us to avoid Esc key on compositionend in Safari.
This fixes following cases which causes hotkey action accidentally:
* hitting Esc key to cancel text composition (mostly in CJK)
Although events on cancelling composition are still heavily
browser / input method dependent, but this implementation would
covers current UI Events spec and some exceptions.
* hitting Esc key to close autocomplete suggestions
This PR changes to use keydown event instead of keyup event as well as other hotkeys.
* Fix: Switching between composing direct message and mention from menus
Previously clicking "direct message" followed by "mention" resulted in the composed status staying as "direct", along with weird spacing of items in the text area. This attempts to fix that.
* Fix: Add missing proptype check for onMention in Status component
* Add the ability to send a direct message to a user from the menu on Statuses
* Add space between "Embed" and "Mention" on expanded statuses menu
`navigator.share()` rejects Promise if user cancelled sharing, and it may
print it as an error on JavaScript console.
This patch ignores it and prints other errors on the console.
* Keep list of blocked domains
Might be overkill, but I'm trying to follow the same logic as for blocked users
* Add basic domain block UI
* Add the domain blocks UI to Getting Started
* Fix undefined URL in `fetchDomainBlocks`
* Update all known users' domain_blocking relationship instead of just one's
* Remove pointer events on the entire UI when a dropdown menu is open
This prevents operations to change the location of the menu such as
scrolling.
* Fix mistake from merge
onScrollToBottom was a function to run instead of onScrollToTop and
onScroll when scrolling to the bottom. The behavior to prevent
onScrollToTop was inconvenient because the viewport can be at the bottom
and at the top at the same time if the viewport is larger than the
container.
onScrollToBottom was also called when the button to load more is clicked
on contray to the name suggests, which led notifications and
status_list_container components to mark the scrolled location is not at
the top mistakenly.
onLoadMore is a replacement for onScrollToBottom. It will be called
independently from onScrollToTop and onScroll.
* Improved media modal
ImageLoader: Impliment pinch zoom by CSS `transform: scale(X)`
ImageLoader: Impliment panning by CSS `overflow: scroll`
ImageLoader: Larger image
MediaModal: Larger close button
MediaModal: Close the modal by swiping vertically
MediaModal: Show/hide close button and right/left navigation on tapping image
MediaModal: Change the `pointer-event` CSS prpp to get more blank space to close the modal
ImageLoader: Zoom/reset zoom on double tap
MediaModal: disable vertical swiping while horizontally swiped
ImageLoader: prevent propagating touchmove event to MediaModal
MediaModal: Adjust size and potision of buttons
ImageLoader: Adjust scroll potision on pinch zoom
* Remove "swipe to close" and "double tap to zoom" features
* remove unused prop and functions
removed `onScroll` prop and `handleScroll` func in ImageLoader
* separate zoom functionary to ZoomableImage component
adjust styling of ImageLoader
add styling for ZoomableImage
* adjust size and potision of close button of media modal
* Fix for gif video
add `onClick` prop to ExtendedVideoPlayer
specify `onClick` prop to video tag for switching nav of `MediaModal`
add `.video-modal` class to scss to separate styling for `VideoModal`
* fix styling for centering
specify height of `ZoomableImage` by pixel
clean styling for `ImageLoader`
* fix lint errors
* small fix
* fixed designated parts
* Responsively enforce 16:9 ratio on all media thumbnails in web UI
Also change video player behaviour to "contain" rather than
"cover" videos that don't fit the ratio, unlike images and GIFs,
it's expected that a video is shown fully.
* Fix spacing issues and remove floor
* Remove floor
* Add focus param to media API, center thumbnails on focus point
* Add UI for setting a focal point
* Improve focal point icon on upload item
* Use focal point in upload preview
* Add focalPoint property to ActivityPub
* Don't show focal point button for non-image attachments
- 4px rounded corners on media attachments
- Better colors/contrast for CW/media spoiler on public pages
- Fix vertical alignment of "Show more" button
- Fix layout jump when unhiding standalone media
* Fix regeneration marker not being removed after completion
* Return HTTP 206 from /api/v1/timelines/home if regeneration in progress
Prioritize RegenerationWorker by putting it into default queue
* Display loading indicator and poll home timeline while it regenerates
* Add graphic to regeneration message
* Make "not found" indicator consistent with home regeneration
* Fix accessibility of column headers
As a screen reader user new to Mastodon, I encountered the following issues with the column headers as designed:
* Jumping between them was difficult. FOr instance, passing my home timeline to reach notification settings was difficult to impossible, especially considering infinite scrolling.
* There doesn't appear to be any means for triggering the control via the keyboard. the `titleClick` handler only responds to mouse clicks.
* I didn't even realize there was a Settings toggle until I made this change.
Thanks for using ARIA in your designs. It's a huge help. But adding a `button` role doesn't add keyboard handling and other button behavior. Also, because the role was on the heading container, it obscured the controls within the container itself. This fix resolve that. It also exposes the headings as headings rather than buttons, enabling skipping columns by using screen readers' heading navigation commands.
Since I myself am blind, if this fix requires additional visual styling, I'd like help applying that so it can be merged. I'd consider it an essential accessibility fix for my and other blind users' existence on the platform. Thanks!
* Styling fixes
* Fixed overflow issue
* Add aria-autocomplete='list' in Textaria
ref: https://www.w3.org/TR/wai-aria-1.1/#aria-autocomplete
* Make detect empty string brefore assign upload description
* Change code elements in keyboard-shortcuts component to kbd
* Add validation for onMuteNotifications
* Break out nested relationship API keys
This closes#5856 by restoring the existing behavior of the `muting`
and `following` keys (returning booleans rather than truthy or false).
It adds `showing_reblogs` and `muting_notifications` keys:
* `showing_reblogs` returns true if:
1. You've requested to follow the user, with reblogs shown, or
2. You are following the user, with reblogs shown.
* `muting_notifications` returns true if you have muted the user and
their notifications as well.
* Rubocop fix
* Fix pulling reblog/mute status from relationships
I could swear this had passed tests before, but apparently not.
Works now.
* More test fixes
Really, you'd expect this to be more straightforward.
* Allow hiding of reblogs from followed users
This adds a new entry to the account menu to allow users to hide
future reblogs from a user (and then if they've done that, to show
future reblogs instead).
This does not remove or add historical reblogs from/to the user's
timeline; it only affects new statuses.
The API for this operates by sending a "reblogs" key to the follow
endpoint. If this is sent when starting a new follow, it will be
respected from the beginning of the follow relationship (even if
the follow request must be approved by the followee). If this is
sent when a follow relationship already exists, it will simply
update the existing follow relationship. As with the notification
muting, this will now return an object ({reblogs: [true|false]}) or
false for each follow relationship when requesting relationship
information for an account. This should cause few issues due to an
object being truthy in many languages, but some modifications may
need to be made in pickier languages.
Database changes: adds a show_reblogs column (default true,
non-nullable) to the follows and follow_requests tables. Because
these are non-nullable, we use the existing MigrationHelpers to
perform this change without locking those tables, although the
tables are likely to be small anyway.
Tests included.
See also <https://github.com/glitch-soc/mastodon/pull/212>.
* Rubocop fixes
* Code review changes
* Test fixes
This patchset closes#648 and resolves#3271.
* Rubocop fix
* Revert reblogs defaulting in argument, fix tests
It turns out we needed this for the same reason we needed it in muting:
if nil gets passed in somehow (most usually by an API client not passing
any value), we need to detect and handle it.
We could specify a default in the parameter and then also catch nil, but
there's no great reason to duplicate the default value.
* Add a hide_notifications column to mutes
* Add muting_notifications? and a notifications argument to mute!
* block notifications in notify_service from hard muted accounts
* Add specs for how mute! interacts with muting_notifications?
* specs testing that hide_notifications in mutes actually hides notifications
* Add support for muting notifications in MuteService
* API support for muting notifications (and specs)
* Less gross passing of notifications flag
* Break out a separate mute modal with a hide-notifications checkbox.
* Convert profile header mute to use mute modal
* Satisfy eslint.
* specs for MuteService notifications params
* add trailing newlines to files for Pork :)
* Put the label for the hide notifications checkbox in a label element.
* Add a /api/v1/mutes/details route that just returns the array of mutes.
* Define a serializer for /api/v1/mutes/details
* Add more specs for the /api/v1/mutes/details endpoint
* Expose whether a mute hides notifications in the api/v1/relationships endpoint
* Show whether muted users' notifications are muted in account lists
* Allow modifying the hide_notifications of a mute with the /api/v1/accounts/:id/mute endpoint
* make the hide/unhide notifications buttons work
* satisfy eslint
* In probably dead code, replace a dispatch of muteAccount that was skipping the modal with launching the mute modal.
* fix a missing import
* add an explanatory comment to AccountInteractions
* Refactor handling of default params for muting to make code cleaner
* minor code style fixes oops
* Fixed a typo that was breaking the account mute API endpoint
* Apply white-space: nowrap to account relationships icons
* Fix code style issues
* Remove superfluous blank line
* Rename /api/v1/mutes/details -> /api/v2/mutes
* Don't serialize "account" in MuteSerializer
Doing so is somewhat unnecessary since it's always the current user's account.
* Fix wrong variable name in api/v2/mutes
* Use Toggle in place of checkbox in the mute modal.
* Make the Toggle in the mute modal look better
* Code style changes in specs and removed an extra space
* Code review suggestions from akihikodaki
Also fixed a syntax error in tests for AccountInteractions.
* Make AddHideNotificationsToMute Concurrent
It's not clear how much this will benefit instances in practice, as the
number of mutes tends to be pretty small, but this should prevent any
blocking migrations nonetheless.
* Fix up migration things
* Remove /api/v2/mutes
* Add option to reduce motion
* Use HOC to wrap all Motion calls
* fix case-sensitive issue
* Avoid updating too frequently
* Get rid of unnecessary change to _simple_status.html.haml
* Fix#2102 - Implement hotkeys
Hotkeys on status list:
- r to reply
- m to mention author
- f to favourite
- b to boost
- enter to open status
- p to open author's profile
- up or k to move up in the list
- down or j to move down in the list
- 1-9 to focus a status in one of the columns
- n to focus the compose textarea
- alt+n to start a brand new toot
- backspace to navigate back
* Add navigational hotkeys
The key g followed by:
- s: start
- h: home
- n: notifications
- l: local timeline
- t: federated timeline
- f: favourites
- u: own profile
- p: pinned toots
- b: blocked users
- m: muted users
* Add hotkey for focusing search, make escape un-focus compose/search
* Fix focusing notifications column, fix hotkeys in compose textarea
aria-label contained body of status with content warning, which should be
hidden by default. Remove the label for the case and other cases due to
consistency.
* Fix#117 - Add ability to specify alternative text for media attachments
- POST /api/v1/media accepts `description` straight away
- PUT /api/v1/media/:id to update `description` (only for unattached ones)
- Serialized as `name` of Document object in ActivityPub
- Uploads form adjusted for better performance and description input
* Add tests
* Change undo button blend mode to difference
* Add emoji autosuggest
Some credit goes to glitch-soc/mastodon#149
* Remove server-side shortcode->unicode conversion
* Insert shortcode when suggestion is custom emoji
* Remove remnant of server-side emojis
* Update style of autosuggestions
* Fix wrong emoji filenames generated in autosuggest item
* Do not lazy load emoji picker, as that no longer works
* Fix custom emoji autosuggest
* Fix multiple "Custom" categories getting added to emoji index, only add once
* Fix JavaScript interface with long IDs
Somewhat predictably, the JS interface handled IDs as numbers, which in
JS are IEEE double-precision floats. This loses some precision when
working with numbers as large as those generated by the new ID scheme,
so we instead handle them here as strings. This is relatively simple,
and doesn't appear to have caused any problems, but should definitely
be tested more thoroughly than the built-in tests. Several days of use
appear to support this working properly.
BREAKING CHANGE:
The major(!) change here is that IDs are now returned as strings by the
REST endpoints, rather than as integers. In practice, relatively few
changes were required to make the existing JS UI work with this change,
but it will likely hit API clients pretty hard: it's an entirely
different type to consume. (The one API client I tested, Tusky, handles
this with no problems, however.)
Twitter ran into this issue when introducing Snowflake IDs, and decided
to instead introduce an `id_str` field in JSON responses. I have opted
to *not* do that, and instead force all IDs to 64-bit integers
represented by strings in one go. (I believe Twitter exacerbated their
problem by rolling out the changes three times: once for statuses, once
for DMs, and once for user IDs, as well as by leaving an integer ID
value in JSON. As they said, "If you’re using the `id` field with JSON
in a Javascript-related language, there is a very high likelihood that
the integers will be silently munged by Javascript interpreters. In most
cases, this will result in behavior such as being unable to load or
delete a specific direct message, because the ID you're sending to the
API is different than the actual identifier associated with the
message." [1]) However, given that this is a significant change for API
users, alternatives or a transition time may be appropriate.
1: https://blog.twitter.com/developer/en_us/a/2011/direct-messages-going-snowflake-on-sep-30-2011.html
* Additional fixes for stringified IDs in JSON
These should be the last two. These were identified using eslint to try
to identify any plain casts to JavaScript numbers. (Some such casts are
legitimate, but these were not.)
Adding the following to .eslintrc.yml will identify casts to numbers:
~~~
no-restricted-syntax:
- warn
- selector: UnaryExpression[operator='+'] > :not(Literal)
message: Avoid the use of unary +
- selector: CallExpression[callee.name='Number']
message: Casting with Number() may coerce string IDs to numbers
~~~
The remaining three casts appear legitimate: two casts to array indices,
one in a server to turn an environment variable into a number.
* Back out RelationshipsController Change
This was made to make a test a bit less flakey, but has nothing to
do with this branch.
* Change internal streaming payloads to stringified IDs as well
Per
https://github.com/tootsuite/mastodon/pull/5019#issuecomment-330736452
we need these changes to send deleted status IDs as strings, not
integers.
* Fix behavior while the button is invisible
e.g. pointer cursor, couldn't open contextmenu
* Avoid rendering the button to remove blank space if no more items are available or no items are rendered
* Redesign video player
* Use new video player on static public pages too
* Use media gallery component on static public pages too
* Pause video when hiding it
* Full-screen sizing on WebKit
* Add aria labels to video player buttons
* Display link card on public status page
* Fix fullscreen from modal sizing issue
* Remove contain: strict property to fix fullscreen from columns
Resolved:
* Lot of redundant renders while mouse moving
* Scroll jumping when timeline loaded
* Scroll position isn't kept when statuses below the scrollTop was deleted then new status arrived
Unresolved:
* Scroll position isn't kept when statuses over the scrollTop was deleted then new status arrived
-> It needs to know which statuses are over the scrollTop
* New status indicator should be active when new statuses arrived while mouse moved recently
-> It needs a) update indicator in ScrollableList, or b) set scrollTop status while mouse moving
* Refactored Avatar and AvatarOverlay (DRY) to have 'account' as prop.
Also removed animate attribute from compose navigation bar, which should
have never been there. Added test for avatar overlay.
* fix broken tests
* god dammit another bug in tests! travis please let this pass
* formatting in avatar overlay
The feature to pin column could hide the rightmost column, which is
specified with children property of ColumnsArea.
The user is likely to see the column when the property changed, so scroll
the area in such cases.
* fix(status_action_bar): Use aria-pressed for reblog and favourite button
* fix(column_back_button): Keyboard accessible
* fix(status_content): Make focusable and accessible
* fix(dropdown_menu): Use aria-expanded instead of aria-pressed
* fix(emoji_picker_dropdown): Use aria-expanded instead of aria-hidden
* feat(icon_button): Add aria-expanded
* fix(privacy_dropdown): Use aria-expanded instead of aria-hidden
* fix(dropdown_menu): Keyboard navigation
* fix(icon_button): Add aria-pressed attribute
* fix(privacy_dropdown): Make accessible
* fix(emoji_picker_dropdown): Make accessible
* fix(icon_button): Support tabIndex
* fix(actions_modal): Remove icon from tab order
* fix(dropdown_menu): Add role=group
* fix(setting_toggle): Toggle via space key
* fix(dropdown_menu): Remove redundant handling of Space key
* fix(emoji_picker_dropdown): Remove redundant Space key handling
* fix(privacy_dropdown): Remove redundant Space key handling
* fix(status): Switch to article and add aria-posinset, aria-setsize
* fix(status_list): Use role=feed and pass more ARIA props to Status
* chore(eslint): jsx-a11y/role-supports-aria-props
* fix(dropdown_menu): Open as modal on mobile
* fix(dropdown_menu): Open modal on touch
* fix(dropdown_menu): Show status
* fix(dropdown_menu): Max dimensions and reduce padding
* chore(dropdown_menu): Test new functionality
* refactor: Use DropdownMenuContainer instead of DropdownMenu
* feat(privacy_dropdown): Open as modal on touch devices
* feat(modal_root): Do not load actions-modal async
* fix(column_header): Invalid ARIA role
* fix(column): Remove hidden nodes from the DOM
* refactor(column_link): Remove unused property hideOnMobile
* fix(column_header): Use aria-pressed
* fix(column_header): Make collapsed content not focusable, add focusable property
* fix(column_loading): Make header non-focusable
* fix(column_settings): Use role to group the toggles
* fix(compose): Use nav and remove redundant aria-label
* fix(tabs_tab): Use nav and add aria-label
* fix(app): Add aria-label for settings toggle button
* chore: Run yarn manage:translations
Though size of extended-video-player is already fixed to 80vw*80vh in components.scss, player size was also set to original video size in extended_video_player.js. Video size is fixed to 80vw*80vh, so video player's size must also be fixed to 80vw*80vh.
* Redesign the landing page, mount public timeline on it
* Adjust the standalone mounted component to the lacking of router
* Adjust auth layout pages to new design
* Fix tests
* Standalone public timeline polling every 5 seconds
* Remove now obsolete translations
* Add responsive design for new landing page
* Address reviews
* Add floating clouds behind frontpage form
* Use access token from public page when available
* Fix mentions and hashtags links, cursor on status content in standalone mode
* Add footer link to source code
* Fix errors on pages that don't embed the component, use classnames
* Fix tests
* Change anonymous autoPlayGif default to false
* When gif autoplay is disabled, hover to play
* Add option to hide the timeline preview
* Slightly improve alt layout
* Add elephant friend to new frontpage
* Display "back to mastodon" in place of "login" when logged in on frontpage
* Change polling time to 3s
* Update links in status content on update as well as mount
Fixes occasional bugs with mentions and hashtags not being set to open in a new column like they should, and instead opening in a new page
* use classList instead of raw className
This fixes a warning on status unmounting (e.g. deletion).
This also resets IntersectionObserverWrapper on disconnect to avoid `unobserve()` calls
which has bug in Edge.
(This patch has been merged as bugfix and reverted, but still valuable as
improvement)
Previously, we've attached IntersectionObserver twice for boosted statuses:
wrapper Status and wrapped Status. but wrapped Status don't need to manage
intersection and visibility by itself, because it's a part of wrapper Status.
* Revert "Bump version to 1.4.4"
This reverts commit 1585b0c6cc.
* Revert "Fix conversations (fixes#3869) (#3870)"
This reverts commit 15b43f555d.
* Revert "Fix streaming server. Redis connection subscribe for each channel. (#3828)"
This reverts commit d8ec832806.
* Revert "Filter direct statuses in Status.as_home_timeline (#3842)"
This reverts commit bab5a18232.
* Revert "Fix RemoteFollow behavior (#3868)"
This reverts commit a20cf3b64e.
* Revert "Update fabricator for MediaAttachment to attach a file according to type (#3862)"
This reverts commit 356df7ae6b.
* Revert "Upgrade React Router (#3677)"
This reverts commit 8f03fdce7f.
* Revert "Do not call setState from unmounted component (#3853)"
This reverts commit 1fc6cb4997.
* Revert "Replace TextIconButton for SensitiveButton to IconButton (#3759)"
This reverts commit eb832e88f4.
* Revert "Fix RTL detection on Ruby side (#3867)"
This reverts commit b16b69350e.
* Revert "i18n: Fixed typo in Polish translation (#3864)"
This reverts commit da6fa029f6.
* Revert "Don't attach IntersectionObserver for wrapped statuses (#3863)"
This reverts commit 94ad0706f5.
This fixes a bug that sometimes boosted statuses being hidden on scrolling.
Previously, we've attached IntersectionObserver twice for boosted statuses:
wrapper Status and wrapped Status. This will call intersection handler twice,
so this may results race condition...probably.
- Use plaintext
- Strip out URLs
- Strip out mentions
- Strip out hashtags
- Strip out whitespace from "overall" count
- Consistent between JS and Ruby
* Add regex filter on the community timeline and the public timeline
* correcting
* Adjust the height of header buttons
* Remove trailing spaces
* Remove trailing spaces
* Solve some code duplication
* reset the state of the locale files in app/javascript/mastodon/locales
* adjust to upstream
* adjust to upstream
* change keys of locale settings
* Allow mounting arbitrary columns
* Refactor column headers, allow pinning/unpinning and moving columns around
* Collapse animation
* Re-introduce scroll to top
* Save column settings properly, do not display pin options in
single-column view, do not display collapse icon if there is
nothing to collapse
* Fix one instance of public timeline being closed closing the stream
Fix back buttons inconsistently sending you back to / even if history exists
* Getting started displays links to columns that are not mounted
I've found this issue when I clicked replies to muted user on the timeline.
Properties I've removed in here were added with lazy loading using
IntersectionObserver (8e4d1cba), but those statuses are not need to be
tracked anyway because it will be rendered as only empty div.
* refactor(components/status_list): Avoid quering scrollTop if not necessary
* refactor(components/dropdown_menu): Do not render items if not expanded
* refactor: Cherry-pick react-motion imports
* refactor(compose/privacy_dropdown): Do not render options if not open
* refactor(components/column_collapsable): Do not render children if collapsed
* feat(eslint): Set react/jsx-no-bind: error
* refactor(notifications/setting_toggle): Do not use bind
* refactor(components/dropdown_menu): Do not use bind
* refactor(components/autosuggest_textarea): Do not use bind
* refactor(compose/privacy_dropdown): Do not use bind
* refactor(compose/upload_form): Do not use bind
* refactor(components/status): Do not use bind
* refactor(components/onboarding_modal): Do not use bind
* refactor: PR feedback
* chore(notifications/setting_toggle): Lint
* refactor: PR feedback
* Always set `overflow: auto` to allow scroll just after opening
* Remove bounce animation which may cause unintended behavior due to max-height
* Use CSS transition instead of react-motion
* Some CSS refactoring including className changing
* Add <ostatus:conversation /> tag to Atom input/output
Only uses ref attribute (not href) because href would be
the alternate link that's always included also.
Creates new conversation for every non-reply status. Carries
over conversation for every reply. Keeps remote URIs verbatim,
generates local URIs on the fly like the rest of them.
* Conversation muting - prevents notifications that reference a conversation
(including replies, favourites, reblogs) from being created. API endpoints
/api/v1/statuses/:id/mute and /api/v1/statuses/:id/unmute
Currently no way to tell when a status/conversation is muted, so the web UI
only has a "disable notifications" button, doesn't work as a toggle
* Display "Dismiss notifications" on all statuses in notifications column, not just own
* Add "muted" as a boolean attribute on statuses JSON
For now always false on contained reblogs, since it's only relevant for
statuses returned from the notifications endpoint, which are not nested
Remove "Disable notifications" from detailed status view, since it's
only relevant in the notifications column
* Up max class length
* Remove pending test for conversation mute
* Add tests, clean up
* Rename to "mute conversation" and "unmute conversation"
* Raise validation error when trying to mute/unmute status without conversation
Use ES Class Fields & Static Properties (currently stage 2) for improve class outlook.
Added babel-plugin-transform-class-properties as a Babel plugin.
* Fix regressions from #2683
Properly format spoiler text HTML, while keeping old logic for blankness intact
Process hashtags and mentions in spoiler text
Format spoiler text for Atom
Change "show more" toggle into a button instead of anchor
Fix style regression on dropdowns for detailed statuses
* Fix lint issue
* Convert spoiler text to plaintext in desktop notifications
* Replace browserify with webpack
* Add react-intl-translations-manager
* Do not minify in development, add offline-plugin for ServiceWorker background cache updates
* Adjust tests and dependencies
* Fix production deployments
* Fix tests
* More optimizations
* Improve travis cache for npm stuff
* Re-run travis
* Add back support for custom.scss as before
* Remove offline-plugin and babili
* Fix issue with Immutable.List().unshift(...values) not working as expected
* Make travis load schema instead of running all migrations in sequence
* Fix missing React import in WarningContainer. Optimize rendering performance by using ImmutablePureComponent instead of
React.PureComponent. ImmutablePureComponent uses Immutable.is() to compare props. Replace dynamic callback bindings in
<UI />
* Add react definitions to places that use JSX
* Add Procfile.dev for running rails, webpack and streaming API at the same time