about summary refs log tree commit diff
AgeCommit message (Collapse)Author
2017-10-21Invalidate cached matcher objects on KeywordMute commit. #164.David Yip
2017-10-21Use more idiomatic string concatentation. #164.David Yip
The intent of the previous concatenation was to minimize object allocations, which can end up being a slow killer. However, it turns out that under MRI 2.4.x, the shove-strings-in-an-array-and-join method is not only arguably more common but (in this particular case) actually allocates *fewer* objects than the string concatenation. Or, at least, that's what I gather by running this: words = %w(palmettoes nudged hibernation bullish stockade's tightened Hades Dixie's formalize superego's commissaries Zappa's viceroy's apothecaries tablespoonful's barons Chennai tollgate ticked expands) a = Account.first KeywordMute.transaction do words.each { |w| KeywordMute.create!(keyword: w, account: a) } GC.start s1 = GC.stat re = String.new.tap do |str| scoped = KeywordMute.where(account: a) keywords = scoped.select(:id, :keyword) count = scoped.count keywords.find_each.with_index do |kw, index| str << Regexp.escape(kw.keyword.strip) str << '|' if index < count - 1 end end s2 = GC.stat puts s1.inspect, s2.inspect raise ActiveRecord::Rollback end vs this: words = %w( palmettoes nudged hibernation bullish stockade's tightened Hades Dixie's formalize superego's commissaries Zappa's viceroy's apothecaries tablespoonful's barons Chennai tollgate ticked expands ) a = Account.first KeywordMute.transaction do words.each { |w| KeywordMute.create!(keyword: w, account: a) } GC.start s1 = GC.stat re = [].tap do |arr| KeywordMute.where(account: a).select(:keyword, :id).find_each do |m| arr << Regexp.escape(m.keyword.strip) end end.join('|') s2 = GC.stat puts s1.inspect, s2.inspect raise ActiveRecord::Rollback end Using rails r, here is a comparison of the total_allocated_objects and malloc_increase_bytes GC stat data: total_allocated_objects malloc_increase_bytes string concat 3200241 -> 3201428 (+1187) 1176 -> 45216 (44040) array join 3200380 -> 3201299 (+919) 1176 -> 36448 (35272)
2017-10-21Make use of the regex attr_reader. #164.David Yip
It would also have been valid to get rid of the attr_reader, but I like being able to reach inside KeywordMute::Matcher without resorting to instance_variable_get tomfoolery.
2017-10-21Fix case-insensitive match scenario; test some word ornamentation. #164.David Yip
2017-10-21Rework KeywordMute interface to use a matcher object; spec out matcher. #164.David Yip
A matcher object that builds a match from KeywordMute data and runs it over text is, in my view, one of the easier ways to write examples for this sort of thing.
2017-10-21Spec out KeywordMute interface. #164.David Yip
2017-10-21Add KeywordMute model.David Yip
Gist of the proposed keyword mute implementation: Keyword mutes are represented server-side as one keyword per record. For each account, there exists a keyword regex that is generated as one big alternation of all keywords. This regex is cached (in Redis, I guess) so we can quickly get it when filtering in FeedManager.
2017-10-21Compose buttons bar redesign + generalize dropdown (#194)Ondřej Hruška
* Generalize compose dropdown for re-use * wip stuffs * new tootbox look and removed old doodle button files * use the house icon for ...
2017-10-20hide mentions of muted accounts (in home col) (#190)beatrix
* hide mentions of muted accounts (in home col) also cleans up some old crap * add test
2017-10-19Merge pull request #191 from glitch-soc/garglamel-yamlbeatrix
ƔAML update
2017-10-19Updates to bio metadata scriptkibigo!
2017-10-19Merge pull request #189 from glitch-soc/scrollable-compose-areabeatrix
Make the compose area optionally scrollable
2017-10-19Make the compose area optionally scrollable.David Yip
On desktop, the compose text box grows to accommodate the content. On mobile, the text box does not grow to accommodate text context, but does grow to accommodate images. It is possible in both cases to overflow the available area, which makes accessing other UI elements (e.g. visibility setttings) difficult. This commit makes the compose area optionally scrollable, which allows those UI elements to remain available even if they go off-screen.
2017-10-18Merge pull request #185 from glitch-soc/fix-null-statusDavid Yip
workaround for null status
2017-10-18Merge pull request #188 from glitch-soc/merge-upstream-2-0-0beatrix
Merge with upstream v2.0.0
2017-10-18formatting fix for eslintOndřej Hruška
2017-10-18Remove unused filesAttached property.David Yip
2017-10-18Update stylesheet imports in glitch components.David Yip
Commit 6e5471947438fc5883e72b8184663564ffadee28 moved the Mastodon variables and mixins deeper in the directory hierarchy; this commit brings the glitch components in line with that change.
2017-10-18Merge tag 'v2.0.0' into gs-masterDavid Yip
2017-10-18Suppress type error(not a function) on calling fastSeek (#5452)Sho Kusano
2017-10-18Bump version to 2.0.0 🐘Eugen Rochko
2017-10-18Fix pt-BR translation strings related to advanced search. (#5449)Renato "Lond" Cerqueira
2017-10-18Revert #5438 for FR (#5450)Technowix
As said here https://github.com/tootsuite/mastodon/pull/5438 the point of shortening the timestamp is legit, and after some time of adaptation no mistakes can be mades.
2017-10-18Some typos and supplementation in sentence structures (#5441)Håkan Eriksson
* Swedish file added * Swedish file added * Swedish file updated * Swedish languagefile added * Add Swedish translation * Add Swedish translation * Started the Swedish translation * Added Swedish lang settings * Updating Swedish language * Updating Swedish language * Updating Swedish language * Updating Swedish language * Updating Swedish language * Updating Swedish language * Swedish language completed and added * Swedish language Simple_form added * Swedish language Divise added * Swedish language doorkeeper added * Swedish language - now all file complete * Swedish - Typos and supplementation in sentence structure * Update simple_form.sv.yml * Update sv.yml * Update sv.yml Rearranged the alphabetical order.
2017-10-18Run `i18n-tasks checked-normalized` in Travis CI (#5443)Yamagishi Kazutoshi
2017-10-18Enable coverage for Jest (#5442)Yamagishi Kazutoshi
2017-10-18fr.json typo (realtive time) (#5447)JohnD28
Typo correction : https://fr.wikipedia.org/wiki/Heure#Typographie
2017-10-17Bump version to 2.0.0rc4Eugen Rochko
2017-10-17Dutch: A few strings I found last minute (#5440)Jeroen
* Dutch: A few strings I found last minute * Update simple_form.nl.yml
2017-10-18Make theme directory and Rename application.scss (#5336)YaQ
* Rename application.scss * Move to 'default' directory * Follow review Move directory, and Rename "mastodon". * Revert rename * undo removal of newline
2017-10-17When unreblog arrives over streaming API, just delete in UI (#5439)Eugen Rochko
2017-10-17i18n better wording (OC/CA/FR) + string added in FR (#5438)JeanGauthier
* Update oc.json * Update fr.json * Update ca.json * Update fr.json * Update simple_form.fr.yml * Update ca.json * Update fr.json * Update oc.json * Update oc.json * Update fr.json
2017-10-17Fix scrolling of dropdown when offscreen (#5434)Nolan Lawson
2017-10-17Fix unwanted content warning gap in CSS (#5436)Eugen Rochko
Fix #5356
2017-10-17When status is fetched instead of delivered, do not stream it (#5437)Eugen Rochko
2017-10-17Don't capture scheme-less URLs in the status (#5435)unarist
Specifically, this fixes status length calculation to be same as JS side. BTW, since this pattern used in not only preview card fetching, we should extract it (with twitter-regex?) and write tests I think.
2017-10-17i18n update (#5427) in OC/CA/FR/ES (#5431)JeanGauthier
* Update oc.json * Update ca.json * Update fr.json * Update es.json
2017-10-17Fix React warning about tabIndex on status with CW (#5432)unarist
2017-10-17Update German translation (#5425)Jakob Kramer
2017-10-17Add Japanese translations (#5427)Yamagishi Kazutoshi
* yarn manage:translations * Add Japanese translation for #5410 * Add Japanese translation for #5393
2017-10-17Normalize locale files (#5429)Yamagishi Kazutoshi
2017-10-17use-DB_NAME-in-development (#5430)masarakki
2017-10-17Clean up reblog tracking keys, related improvements (#5428)aschmitz
* Clean up reblog-tracking sets from FeedManager Builds on #5419, with a few minor optimizations and cleanup of sets after they are no longer needed. * Update tests, fix multiply-reblogged case Previously, we would have lost the fact that a given status was reblogged if the displayed reblog of it was removed, now we don't. Also added tests to make sure FeedManager#trim cleans up our reblog tracking keys, fixed up FeedCleanupScheduler to use the right loop, and fixed the test for it.
2017-10-17Swedish translation (#5406)Håkan Eriksson
* Swedish file added * Swedish file added * Swedish file updated * Swedish languagefile added * Add Swedish translation * Add Swedish translation * Started the Swedish translation * Added Swedish lang settings * Updating Swedish language * Updating Swedish language * Updating Swedish language * Updating Swedish language * Updating Swedish language * Updating Swedish language * Swedish language completed and added * Swedish language Simple_form added * Swedish language Divise added * Swedish language doorkeeper added * Swedish language - now all file complete
2017-10-17Small update Dutch (nl) strings (#5424)Jeroen
* Update Dutch strings * Update Dutch
2017-10-16Fix dual toot button wrong behavior after compose re-designOndřej Hruška
2017-10-16workaround for null statusOndřej Hruška
2017-10-16Merge pull request #184 from tootsuite/masterbeatrix
Fix reduced motion breaking public galleries (#5423)
2017-10-16Merge pull request #182 from glitch-soc/wide-tootbox-panelDavid Yip
Full-width tootbox panel to make room for buttons
2017-10-16Merge pull request #181 from glitch-soc/upstream-merge-againDavid Yip
Merge upstream, pull in fixes for tootsuite/mastodon#{5409,5417}