Commit Graph

14203 Commits

Author SHA1 Message Date
Sam Saffron
ee470b5317 remove old markdown engine work-in-progress 2017-07-12 17:44:40 -04:00
Neil Lalonde
24db001bfa FIX: user card contents can go up out of the bounds of the card when user has a title and full name 2017-07-12 16:16:59 -04:00
Arpit Jalan
76981605fa FIX: don't raise error when inviting existing user to private topic via email
https://meta.discourse.org/t/inviting-existing-user-to-a-private-topic-message-via-email-shows-error-message/65994
2017-07-12 21:51:21 +05:30
Régis Hanol
a6dff79c2c change log level to info when failing to download a hotlinked image 2017-07-12 11:06:28 +02:00
Sam
98e03b04b5 Don't depend on imports for md extensions 2017-07-11 16:48:25 -04:00
Sam
5d139e461c FIX: multi option poll not working (new engine) 2017-07-11 14:43:34 -04:00
Sam
3f950a756a FEATURE: support image dimensions via Markdown image 2017-07-11 12:13:03 -04:00
Robin Ward
1163c086a3 FIX: Missing model binding 2017-07-11 11:19:49 -04:00
Arpit Jalan
3fb1c21dd5 Fix the build. 2017-07-11 19:26:33 +05:30
Sam
9840e4285d Merge pull request #4962 from nbianca/add_composer_events
Added events to show and hide the preview pane.
2017-07-11 08:26:25 -04:00
Arpit Jalan
35fb45749d FIX: remove unneeded code 2017-07-11 13:21:41 +05:30
Guo Xiang Tan
31932813b7 FIX: Wait for CSS transition to end before attempting to focus.
https://meta.discourse.org/t/tab-should-work-after-edit-title-or-using-hotkeys/65792
2017-07-11 15:26:57 +09:00
Guo Xiang Tan
3ff9133f85 FIX: Only trigger callback for parent transition events.
* This fixes a bug where multiple requests were being
  made to the server whenever the composer is opened.
2017-07-11 15:09:22 +09:00
Guo Xiang Tan
f529cb1674 Remove validation for invalid interpolation keys.
* Our codebase currently supports custom interpolations keys that are
  not present in the original translation. The proper fix should
  be to make `TranslateOverride` aware of such keys.
2017-07-11 11:12:11 +09:00
Guo Xiang Tan
c5b1317a15 Remove code that is no longer being used. 2017-07-11 11:11:51 +09:00
Bianca Nenciu
375eb290b9 Made changes as per review. 2017-07-10 23:28:35 +01:00
Bianca Nenciu
1e7f0fd8f1 Added events to show and hide the preview pane. 2017-07-10 20:23:56 +01:00
Robin Ward
31f7640335 FIX: Allow discourse app to link directly to wizard 2017-07-10 14:31:58 -04:00
Robin Ward
dcdd5baf54 FIX: Only show search if there are more total posts than the chunk size 2017-07-10 13:46:50 -04:00
Sam
ba9898c5a9 FIX: smarter newline handling for <img> tags on line alone
Run all of pretty text spec on new engine
2017-07-10 12:22:15 -04:00
Régis Hanol
c66b9dcdbd add 'us-east-2' S3 region 2017-07-10 15:36:38 +02:00
Arpit Jalan
3b1b00a869 FIX: invited user should not be able to redeem invite as admin 2017-07-10 07:47:37 +05:30
Robin Ward
f1a6449e4b SECURITY: Remove disposable invite feature 2017-07-07 20:24:39 -04:00
Sam
9fb180f839 we don't want that console.log 2017-07-07 16:38:52 -04:00
Sam
6f09df0deb FIX: don't create tags autolinks inside links (new engine) 2017-07-07 13:04:25 -04:00
Sam
436b894f7a FIX: mention not working after a newline (new engine) 2017-07-07 11:06:50 -04:00
Robin Ward
fa2eb8dab1 UX: Reply button was offset improperly when anonymous 2017-07-06 15:05:45 -04:00
Guo Xiang Tan
e92acb4c40 FIX: Jobs::PullHotlinkedImages#is_valid_image_src returns true for a generic string. 2017-07-06 18:31:15 +09:00
Régis Hanol
405672f8e6 Merge pull request #4957 from jjaffeux/google-classic
FIX: s/google_blob/google_classic
2017-07-06 10:29:40 +02:00
Guo Xiang Tan
b49579d9a7 FIX: Disable topic status info when no category has been selected. 2017-07-06 17:08:29 +09:00
Joffrey JAFFEUX
6fd44b1efd FIX: s/google_blob/google_classic 2017-07-06 09:05:15 +02:00
Guo Xiang Tan
f6491ee125 FIX: Select topic timer's category by default in edit modal. 2017-07-06 16:01:57 +09:00
Robin Ward
c53eeaaa68 REFACTOR: Remove requirejs calls 2017-07-05 17:24:27 -04:00
Robin Ward
754c1e5438 Upgrade to Babel 6 2017-07-05 15:25:23 -04:00
Joffrey JAFFEUX
fcc50edeef FIX: do not override 🦗 with :cricket_bat_and_ball: 2017-07-05 18:51:25 +02:00
Joffrey JAFFEUX
76a55fd138 FIX: adds new emojis into correct groups 2017-07-05 16:24:53 +02:00
Guo Xiang Tan
061aa261da Log site name when logging to Logster in Jobs::PullHotlinkedImages. 2017-07-05 10:34:24 +09:00
Guo Xiang Tan
4e8b80c157 Remove unnecessary ensure block. 2017-07-05 10:21:42 +09:00
Neil Lalonde
fcb2f68565 FIX: duplicate topics and posts in summary email because user has muted tags and topics contain multiple tags 2017-07-04 16:12:10 -04:00
Robin Ward
df213639f1 UX: Allow CTRL+ENTER to save topic title edits 2017-07-04 14:23:57 -04:00
Neil Lalonde
3964929c75 FIX: summary email excludes all untagged topics if user has muted some tags 2017-07-04 12:52:25 -04:00
Robin Ward
35ff5d6796 FIX: Naving to root URL was broken 2017-07-04 12:44:53 -04:00
Sam
43ecfb016a Merge pull request #4950 from jjaffeux/use-emoji-db
FEATURE: emoji generation now uses emoji-db
2017-07-04 09:01:13 -04:00
Joffrey JAFFEUX
a71c75367e FEATURE: emoji generation now use emoji-db
- unicode 10
- emoji 5.0
- support for google_blob and facebook_messenger sets
2017-07-04 14:08:47 +02:00
Arpit Jalan
c243861b17 FIX: do not show "Send Activation Email" button if must_approve_users setting is enabled
https://meta.discourse.org/t/error-when-pressing-send-activitation-email-when-must-approve-users-setting-is-enabled/65408
2017-07-04 14:00:50 +05:30
Sam
d2ba543ed3 correct case where %20 decoded as space in auto link
correct case where onebox is not applied when url is decoded
2017-07-03 16:32:53 -04:00
Sam
340a3ee5cb correct spec to handle not null visibility_level 2017-07-03 16:03:26 -04:00
Sam
45c3ad5f91 FIX: stop highlighting single l which is used for sorting 2017-07-03 15:45:15 -04:00
Sam
845170bd6b FEATURE: add support for group visibility level
There are 4 visibility levels

- public (default)
- members only
- staff
- owners

Note, admins and group owners ALWAYS have visibility to groups

Migration treated old "non public" as "members only"
2017-07-03 15:26:57 -04:00
Sam
c79418d334 DEV: Move RTL into lib where it belongs 2017-07-03 15:26:57 -04:00
Arpit Jalan
984778d3ac FIX: handle moving first post to a closed/archived topic 2017-07-03 21:21:20 +05:30
Arpit Jalan
72c92b0f4e FIX: include canonical meta tag on category pages 2017-07-03 13:25:22 +05:30
Arpit Jalan
d3ee5752b8 remove unneeded condition from invite model 2017-07-01 21:50:34 +05:30
Arpit Jalan
4fb9269642 FEATURE: optimize invite js code 2017-07-01 19:11:39 +05:30
Robin Ward
566cf31c66 UX: Always show topic progress on mobile 2017-06-30 16:19:19 -04:00
Sam
0650c8dbab optimize rule lookup
we have tons of bbcode rules, might as well speed them up
2017-06-30 15:19:16 -04:00
Robin Ward
0ba39109a0 FIX: Make omit_default_port the global default 2017-06-30 12:43:26 -04:00
Robin Ward
46a3b30021 FIX: omit the default port in the Host header 2017-06-30 12:36:02 -04:00
Sam
a55e679563 support wrap function in bbcode rules 2017-06-30 12:21:01 -04:00
Sam
5c89a37ceb FIX: log when push notifications fail 2017-06-30 10:45:53 -04:00
Arpit Jalan
16d356ab4e FEATURE: resending invite should include original custom message
https://meta.discourse.org/t/will-resent-invite-include-original-custom-message/64699
2017-06-30 18:13:33 +05:30
Sam
c1580b9d36 attempt to fix push notifications 2017-06-30 08:40:43 -04:00
Sam
ca40c1725c add support for a wrap function in bbcode replace 2017-06-29 16:43:57 -04:00
Sam
d941ed90d6 support for bbcode [code] blocks 2017-06-29 16:04:10 -04:00
Sam
de50d8cd35 Support for [email] [url] [img] bbcodes 2017-06-29 14:00:09 -04:00
Arpit Jalan
e7b9b1312e FEATURE: remove all invites
https://meta.discourse.org/t/remove-all-invitations-button-for-the-admin-panel/65207
2017-06-29 22:30:10 +05:30
Sam
c6b83f4714 Correct logic so hashtags are properly ignored in links 2017-06-29 12:48:20 -04:00
Robin Ward
6ff7bf7505 REFACTOR: Use component for cook-text to improve async workflow 2017-06-29 12:14:27 -04:00
Arpit Jalan
aa1a68b979 UX: do not show "Message" button on user's own profile page/card 2017-06-29 14:27:00 +05:30
Guo Xiang Tan
5e156fbe85 FIX: Group.search should look up Group#full_name too.
https://meta.discourse.org/t/mentioning-group-by-full-name-doesnt-work/63437/3
2017-06-29 16:37:59 +09:00
Guo Xiang Tan
7b35c55a1e FIX: Display Google search form when 404 page is rendered by Ember. 2017-06-29 14:37:24 +09:00
Régis Hanol
e12601b850 Merge pull request #4946 from jjaffeux/emoji-picker-fixes
Emoji picker fixes
2017-06-29 00:30:55 +02:00
Joffrey JAFFEUX
65fd92b991 Fixes glitch on iOS safari 2017-06-29 00:27:16 +02:00
Joffrey JAFFEUX
6e1a06d07f Uses es6 object literal shorthand 2017-06-29 00:27:02 +02:00
Robin Ward
25cecd5d25 FIX: Topic Entrance wasn't showing up on some suggested topics 2017-06-28 17:38:01 -04:00
Guo Xiang Tan
ad4694cdcd Revert "FIX: Can't cook queued posts when markdown-it is enabled."
This reverts commit 5ff563cddd.
2017-06-29 06:14:36 +09:00
Robin Ward
284570a5ae FIX: Don't show the admin menu if the progress bar is hidden 2017-06-28 16:31:55 -04:00
Sam
0e391a72a1 use custom whitelister for tables 2017-06-28 16:08:29 -04:00
Robin Ward
f7b686117b UX: Add a span to d-button so text can be hidden via CSS 2017-06-28 15:46:09 -04:00
Robin Ward
f6222ff225 FIX: Populate the Email Digest preview with the current username 2017-06-28 15:38:57 -04:00
Sam
6200d7d6ab correct bug where only a single poll per topic worked 2017-06-28 15:36:19 -04:00
Sam
cfbda863e8 implement unicode emoji replacements 2017-06-28 13:47:30 -04:00
Sam
301731ef24 make cook-text async friendly 2017-06-28 11:29:34 -04:00
Joffrey JAFFEUX
560dfe74af Adds support for skin tones in emoji picker 2017-06-28 15:07:05 +02:00
Guo Xiang Tan
a2349b99b6 FIX: Plugin outlet should be wrapped under d-editor-preview-wrapper. 2017-06-28 17:52:38 +09:00
Régis Hanol
173307de10 Merge pull request #4944 from nbianca/preview_plugin_outlet
Removed useless element (div).
2017-06-28 10:14:38 +02:00
Bianca Nenciu
2bf8b5706f Removed useless element (div).
{{plugin-outlet}} already wraps everything.
2017-06-28 11:04:41 +03:00
Sam
d4dbcca91b Merge pull request #4942 from nbianca/preview_plugin_outlet
Added plugin outlet near editor's preview.
2017-06-27 17:34:31 -04:00
Sam
fed57be9ed style table in preview as well 2017-06-27 17:26:33 -04:00
Sam
4c5109ff5b FEATURE: site setting for Markdown typographer
It ships anyway with markdown.it so we might as well expose it
2017-06-27 16:50:13 -04:00
Sam
0d62420cbe Space prior to onebox stops onebox resolution 2017-06-27 16:16:17 -04:00
Sam
232de90607 explicit autolink should not be oneboxed 2017-06-27 15:34:16 -04:00
Sam
91a91d57f0 FIX: when quoting always ensure we are on a new line 2017-06-27 13:59:17 -04:00
Sam
e2f57a154b FIX: blockquote button implementation
Previously clicking on blockquote in the middle of sentence
would result in incorrect formatting
2017-06-27 13:32:20 -04:00
Neil Lalonde
bca678ee5a FIX: mentions in category boxes are too big 2017-06-27 10:54:43 -04:00
Sam
0e0092d738 corrected a parsing edge cases for bbcode blocks 2017-06-27 10:07:06 -04:00
Jeff Atwood
38950cdc10 add missing span tags to new topic btn 2017-06-27 02:47:10 -07:00
Arpit Jalan
70781749cd UX: add unique class to "most liked" section on user summary page 2017-06-27 14:49:52 +05:30
Guo Xiang Tan
5ff563cddd FIX: Can't cook queued posts when markdown-it is enabled. 2017-06-27 12:24:52 +09:00
Robin Ward
10358811a1 UX: Don't hide the reply button by default 2017-06-26 17:35:28 -04:00
Régis Hanol
aa69f78fed let's not use progressing rendering on images 2017-06-26 23:19:48 +02:00
Sam
21f7ac1f25 correct spec, require closing tag for bbcode blocks 2017-06-26 16:51:55 -04:00
Rafael dos Santos Silva
43ecbc86d4 FEATURE: Use current table styles for markdown-it tables 2017-06-26 16:56:46 -03:00
Sam
8967d50dc2 Clean up sanitization code
- remove html table test, this is soon to be deprecated
- move sanitization tests into pretty text.rb
- fix up whitelister so it makes a copy of options
2017-06-26 15:21:47 -04:00
Robin Ward
4f27259e27 UX: Make the edit wiki button more prominent 2017-06-26 14:34:59 -04:00
Sam
e9f55adb3a FEATURE: add table support 2017-06-26 13:25:05 -04:00
Robin Ward
bf592c0ee7 FIX: Wrench would incorrectly on wide browsers with composer up 2017-06-26 13:17:58 -04:00
Sam
df5ee0cfc1 correct onebox rendering so it fills in cached
the onebox plugin needs to pull in the actual cached onebox
and bypass the whitelister for onebox content
2017-06-26 13:09:58 -04:00
Robin Ward
c6408550cd Add a little contrast between the wrench and progress bar 2017-06-26 12:32:20 -04:00
Neil Lalonde
eee00b5bb5 UX: include a link to change email preferences at the bottom of summary emails as an alternative to unsubscribing 2017-06-26 12:27:22 -04:00
Sam
81eb3218b2 FEATURE: used strict sanitizer by default
This amends it so sanitize always uses the most strict sanitizer
by default, if it needs to be "widened" to use more options then
you need to pass it more options.
2017-06-26 11:27:30 -04:00
Bianca Nenciu
81dc1f039d Added plugin outlet near editor's preview. 2017-06-26 12:13:27 +03:00
Guo Xiang Tan
7ed9fbb415 FIX: Use default parameter in method. 2017-06-26 11:14:13 +09:00
Guo Xiang Tan
1ab60d83df PERF: Terminate scheduled job earlier if badge is not enabled. 2017-06-26 10:13:58 +09:00
Neil Lalonde
69b2d64334 FIX: letter avatars in quotes on subfolders installs are broken 2017-06-23 17:12:13 -04:00
Sam
da5ccd2000 correctly hunt for console.log 2017-06-23 15:24:20 -04:00
Robin Ward
34867a6e07 UX: Support for displaying wrench alongside progress bar 2017-06-23 14:39:18 -04:00
Sam
814c8804d4 correct text highlighting for no highlight 2017-06-23 14:35:46 -04:00
Sam
05e5a740a6 FEATURE: consistent bbcode inline and block rulers 2017-06-23 12:01:33 -04:00
Sam
234694b50f Feature: CommonMark support
This adds the markdown.it engine to Discourse.
https://github.com/markdown-it/markdown-it

As the migration is going to take a while the new engine is default
disabled. To enable it you must change the hidden site setting:
enable_experimental_markdown_it.

This commit is a squash of many other commits, it also includes some
improvements to autospec (ability to run plugins), and a dev dependency
on the og gem for html normalization.
2017-06-23 12:01:33 -04:00
Sam
6048ca2b7d Merge pull request #4941 from jjaffeux/emoji-ordering
Emoji ordering
2017-06-23 12:00:16 -04:00
Joffrey JAFFEUX
7c68949e04 Emoji ordering
This commit uses
http://www.unicode.org/emoji/charts/emoji-ordering.html to generate an
automatic ordering of emojis. We also don't have to maintain a full
emoji list for groups but only sub sections.
2017-06-23 17:51:13 +02:00
Régis Hanol
a682ef5266 calendar should overflow in the 'Feature this topic' modal 2017-06-23 17:51:04 +02:00
Régis Hanol
73a4a05c5b make eslint happy again 2017-06-23 16:06:32 +02:00
Régis Hanol
a9c0df0b58 FIX: always try to convert PNG to JPG when pasting an image 2017-06-23 12:13:48 +02:00
Jeff Atwood
bfd892bbbc better responsive layout for new topic btn 2017-06-23 01:52:09 -07:00
Jeff Atwood
8c9e24e9b0 override desktop styles for mobile topic admin 2017-06-23 00:59:53 -07:00
Guo Xiang Tan
6cc174ca82 PERF: Fetch users in batches in grant anniversary badge job. 2017-06-23 16:54:35 +09:00
Jeff Atwood
c1c778f1e5 move mobile topic admin button to bottom 2017-06-23 00:36:50 -07:00
Guo Xiang Tan
cbedc1a2ca FIX: Notification backdrop does not display when user menu has been toggled.
https://meta.discourse.org/t/first-pm-spotlight-does-not-work-with-welcome-message-delay/64927/16?u=tgxworld
2017-06-23 11:35:06 +09:00
Robin Ward
5fda2b84e1 FIX: If the progress bar is docked, set the progress to 100% 2017-06-22 14:43:15 -04:00
Robin Ward
b22df9f166 FIX: Double header rendering issues, redux 2017-06-22 12:50:46 -04:00
Régis Hanol
6e5c59e5ec FIX: image orientation wasn't properly working 2017-06-22 16:53:49 +02:00
Régis Hanol
a916f6b0c8 remove some warnings with already declared constants 2017-06-22 12:55:58 +02:00
Régis Hanol
2e7753c27f User 'FileHelper.is_image?' to check wether a link is poiting to an image 2017-06-22 12:54:42 +02:00
Guo Xiang Tan
80e348d226 PERF: Speed up slow tests in our test suite.
Before

```
Finished in 7 minutes 23 seconds (files took 4.15 seconds to load)
7145 examples, 0 failures, 10 pending
```

After

```
Finished in 6 minutes 12 seconds (files took 4.41 seconds to load)
7145 examples, 0 failures, 10 pending
```
2017-06-22 11:23:31 +09:00
Robin Ward
1a02f5154f FIX: Dirty keys should become to a widget, not global 2017-06-21 14:27:08 -04:00
Robin Ward
287cb4bfc5 FEATURE: Allow truncated group posts to be expanded 2017-06-21 12:56:38 -04:00
Robin Ward
32756060bb REFACTOR: Remove unused component 2017-06-21 12:32:56 -04:00
Robin Ward
d09bed0d76 FIX: Some stream items don't have post_id, so expand by topic id / post number 2017-06-21 12:27:39 -04:00
Guo Xiang Tan
4c98bd9d5f FIX: Can't update status_type of topic timers.
https://meta.discourse.org/t/topic-timers-internal-error-500/64805
2017-06-21 15:31:15 +09:00
Guo Xiang Tan
dd85c1098b Remove comment that is no longer valid. 2017-06-21 14:10:30 +09:00
Jeff Atwood
0dd1d736c8 user stream UI should match time color 2017-06-20 17:19:53 -07:00
Robin Ward
a289ae67e1 FEATURE: Expand truncated posts in the user stream 2017-06-20 15:45:41 -04:00
Robin Ward
ae7734707e REFACTOR: Merge different templates from rendering user stream items 2017-06-20 15:45:41 -04:00
Guo Xiang Tan
fa35137d3a PERF: Reduce allocations in Emoji.unicode_replacements.
```
MemoryProfiler.report { Emoji.unicode_replacements }.pretty_print
```

Before:

```
Total allocated: 2032131 bytes (30219 objects)
Total retained:  798059 bytes (10734 objects)

allocated memory by gem
-----------------------------------
   1270762  discourse/app
    690149  2.4.1/lib
     48764  activesupport-4.2.8
     11405  bootsnap-1.0.0
      5266  logster-1.2.7
      2473  hiredis-0.6.1
      2056  redis-3.3.3
       840  discourse/lib
       240  activerecord-4.2.8
       176  thread_safe-0.3.6
```

After:

```
Total allocated: 1715713 bytes (22449 objects)
Total retained:  797985 bytes (10737 objects)

allocated memory by gem
-----------------------------------
    957250  discourse/app
    690028  2.4.1/lib
     48764  activesupport-4.2.8
     11445  bootsnap-1.0.0
      2745  hiredis-0.6.1
      2624  redis-3.3.3
      1473  logster-1.2.7
       928  discourse/lib
       280  activerecord-4.2.8
       176  thread_safe-0.3.6
```
2017-06-20 13:50:37 +09:00
Guo Xiang Tan
40ef5c4f14 PERF: Reduce memory allocation by Emoji.unicode_replacements.
Calling `Emoji.tonable_emojis` fetches from the cache but creates
a giant array each time it is called.

```
MemoryProfiler.report { Emoji.unicode_replacements }.pretty_print
```

Before:

```
Total allocated: 16560770 bytes (246364 objects)
Total retained:  784793 bytes (10624 objects)

allocated memory by gem
-----------------------------------
  10224581  activesupport-4.2.8
   3504241  hiredis-0.6.1
   1449466  discourse/app
    679314  2.4.1/lib
    419592  discourse/lib
    226720  redis-3.3.3
     56680  activerecord-4.2.8
       176  thread_safe-0.3.6
```

After:

```
Total allocated: 2127703 bytes (30556 objects)
Total retained:  798099 bytes (10735 objects)

allocated memory by gem
-----------------------------------
   1270762  discourse/app
    690149  2.4.1/lib
    106977  bootsnap-1.0.0
     48764  activesupport-4.2.8
      5266  logster-1.2.7
      2473  hiredis-0.6.1
      2056  redis-3.3.3
       840  discourse/lib
       240  activerecord-4.2.8
       176  thread_safe-0.3.6
```
2017-06-20 13:10:44 +09:00
Robin Ward
394efb3290 FIX: Docking of progress component on iOS was a bit off 2017-06-19 15:53:51 -04:00
Neil Lalonde
14256e11e7 FIX: topic list wrapping under category list on some screens 2017-06-19 15:23:32 -04:00
Arpit Jalan
34126eb9e0 optimize 'hide help button' code 2017-06-19 22:20:09 +05:30