Commit graph

3147 commits

Author SHA1 Message Date
Paul Kaplan
dbca5a4044
Merge pull request #2226 from LLK/i10n-preview
Extract strings for localizing the preview page
2018-10-24 16:00:40 -04:00
Paul Kaplan
fa7c2d5b09
Merge pull request #2230 from paulkaplan/single-comment-mode
Showing specific comment by url hash on preview
2018-10-24 15:41:14 -04:00
Benjamin Wheeler
95dc611d77
Merge pull request #2222 from benjiwheeler/copy-remix
Set capability flags to be passed to GUI, to support remix and save as copy
2018-10-24 13:24:40 -04:00
Paul Kaplan
2c5efbda50 Fix scss linting 2018-10-24 11:45:17 -04:00
Paul Kaplan
5158907c5b
Merge pull request #2229 from paulkaplan/sudo-fix-load-more
Do not rely on total comment number for load more functionality
2018-10-24 11:42:00 -04:00
Paul Kaplan
faf3f49c50 Fix proptypes 2018-10-24 10:43:21 -04:00
Paul Kaplan
520018ee50 View single thread of comments by URL hash 2018-10-24 10:29:33 -04:00
Paul Kaplan
4d8256e985 Update all preview... l10n strings to project... 2018-10-24 09:35:30 -04:00
Paul Kaplan
ecb497b30f
Merge pull request #2228 from paulkaplan/update-comments-endpoints
Update the comment routes
2018-10-24 09:19:03 -04:00
Paul Kaplan
ae626d5244 Do not rely on total comment number for load more functionality
Show the load more comments button any time the last comment page was filled to the requested limit. As noted in the comment, this heuristic will be wrong at most 5% of the time but the failure mode (showing load more which, when clicked doesn't load any more, just goes away) is very mild, and for the overwhelming majority of project views that happen on projects with many, many comments, this is very unlikely to ever be noticed. It obviously isn't a perfect solution, but I cannot think of another that does not need the server to do another query to find out the total number of visible comments, or to find out if there are more comments after the requested offset+limit.
2018-10-24 09:18:45 -04:00
Paul Kaplan
efb1a380da Update the comment routes 2018-10-24 08:55:36 -04:00
Colby Gutierrez-Kraybill
48e70307c8
Merge pull request #2121 from colbygk/add_maint_page
Maintenance and trouble related static content
2018-10-24 06:18:05 -04:00
Ben Wheeler
3d964911a1 renamed canSaveAsCopy to canCreateCopy 2018-10-23 17:42:55 -04:00
Ben Wheeler
d713249bee changed the meaning of canCreateNew to true creation 2018-10-23 17:42:55 -04:00
Ben Wheeler
e03f83466e better logic around canSave when project is new 2018-10-23 17:42:55 -04:00
Ben Wheeler
ed7b6541e9 set canRemix and canSaveAsCopy 2018-10-23 17:42:55 -04:00
Paul Kaplan
f4887008a5 Extract strings for localizing the preview page 2018-10-23 11:38:34 -04:00
chrisgarrity
fdeab4de05
Merge pull request #2213 from chrisgarrity/issue/2172-integrate-intl
Integrate www-gui localization
2018-10-23 07:02:38 -04:00
chrisgarrity
3fcc13a8cd Integrate www-gui localization
* Initialize `locales` in redux using methods exported by GUI.
* pass GUI method to set the `scratchlanguage` cookie

NOTE: It does not reload the page, so switching back to the project page will not reflect language changes made in gui until the next page reload. Reloading the page will lose project state so we don’t want to do that.
2018-10-22 17:38:35 -04:00
Paul Kaplan
ecd686f5a8
Merge pull request #2221 from paulkaplan/fix-parent-id
Use parent_id and commentee_id correctly when posting comments.
2018-10-22 16:37:46 -04:00
Paul Kaplan
c289ce72d1 Use parent_id and commentee_id the right way when posting comments.
The parent_id is the top-level-parent, the commentee_id is the user to whom the comment is directed , the one that is mentioned in @ reply.
2018-10-22 14:35:42 -04:00
Benjamin Wheeler
a6409bbcce
Pass to and receive from GUI info about project creation lifecycle; handle url changes (#2197)
* add canSaveNew prop to pass to GUI

* pass to and receive from GUI info about project lifecycle

* reset project data or fetch new project data depending on updates received from gui

* removed canSaveNew

* projectId always a string

* moved handleUpdateProjectId calls that fetch or set project metadata into componentDidUpdate

* changed page history object

* removed comments

* two small fixes to deal with edge cases

* cleaning up getExtensions
2018-10-19 16:02:59 -04:00
Paul Kaplan
8acbf05b1a
Merge pull request #2211 from paulkaplan/fix-studio-modal
Connect the consolidated studio data directly
2018-10-19 10:44:32 -04:00
chrisgarrity
b0a5f7feff
Merge pull request #2183 from sehgalvibhor/character-fix
Japanese Character Fix
2018-10-19 09:12:53 -04:00
Paul Kaplan
f9f662a3f3
Merge pull request #2206 from paulkaplan/staff-comments
Add * to comments from staff on preview
2018-10-19 08:55:41 -04:00
Paul Kaplan
35abd285df Connect the consolidated studio data directly
To the modal to prevent constantly updating. Also only render the modals if they are visible
2018-10-18 16:45:24 -04:00
Paul Kaplan
f3b9826fd5
Merge pull request #2208 from paulkaplan/fix-load-more
Use top level + replies count to control "Load More" comments button
2018-10-18 13:19:10 -04:00
Paul Kaplan
4f6f7502ae
Use scratchteam instead of is_staff 2018-10-18 13:09:43 -04:00
Paul Kaplan
61947f2390
Use scratchteam instead of is_staff 2018-10-18 13:09:08 -04:00
Paul Kaplan
efc26aef21
Merge pull request #2207 from paulkaplan/show-replying-to
Show the username of the parent comment in replies
2018-10-18 11:43:52 -04:00
Paul Kaplan
066e5ff141 Use top level + replies count to control "Load More" comments button
This fixes an issue where a project with one top-level comment and one reply would should the "Load more" button at the bottom, even though there were no more to load
2018-10-18 11:42:10 -04:00
Paul Kaplan
1d3c3ff431 Use EmojiText component to allow emoji display when API includes them 2018-10-18 10:18:00 -04:00
Paul Kaplan
c257379846 Add * to comments from staff on preview
This requires the API to include the `is_staff` flag, but it will not change functionality if it is not there, everyone would be considered not staff, which is the current behavior.
2018-10-18 10:14:42 -04:00
Paul Kaplan
d982d2d723 Show the username of the person being replied to in a comment on preview 2018-10-18 10:11:51 -04:00
chrisgarrity
fdde8a80dd
Merge pull request #2192 from chrisgarrity/update-tx-config
Add missing l10n files to tx config
2018-10-18 09:17:38 -04:00
Paul Kaplan
505dda09ae
Merge pull request #2198 from paulkaplan/fix-comment-msg
Comment minor fixes
2018-10-17 14:09:53 -04:00
Paul Kaplan
312a9e2bff Restrict reporting comments to logged in users 2018-10-17 13:19:46 -04:00
Paul Kaplan
7b514344fa Allow admins access to comment delete 2018-10-17 13:16:41 -04:00
Paul Kaplan
242f01118b Add missing status message for comments 2018-10-17 11:56:43 -04:00
Paul Kaplan
fa68377bca
Merge pull request #2194 from paulkaplan/all-comments
Add admin capabilities to preview project comments
2018-10-17 11:33:23 -04:00
Ray Schamp
cd0fb08045 Change conditional rendering to be consistent 2018-10-17 11:21:52 -04:00
Paul Kaplan
2ac90315ea Use can prefix instead of undefined callback 2018-10-16 15:09:10 -04:00
Paul Kaplan
1965a1223d Fix sass lint 2018-10-16 15:08:01 -04:00
Paul Kaplan
7772e197c7 Make comment deleting and restoring correctly update replies 2018-10-16 15:08:01 -04:00
Paul Kaplan
592c0e5703 Add restore functionality to comments for admins 2018-10-16 15:08:00 -04:00
Paul Kaplan
b0ac4018ee Use admin routes to include all comments when loading page 2018-10-16 15:08:00 -04:00
Paul Kaplan
b7b7b079b9 Combine comment reported and deleted flags into visibility string
To prepare for server including visibility
2018-10-16 15:08:00 -04:00
sjgllghr
6d8235c7e8 Fix gh-2156: Use variables for media queries for consistency (#2182)
* use variables for media queries

* add medium-and-intermediate media query variable
2018-10-16 13:28:41 -04:00
Paul Kaplan
effbfbeaff
Merge pull request #2196 from paulkaplan/share-banner
Make share banner work on preview
2018-10-16 13:21:16 -04:00
Paul Kaplan
9ce79deac6 Control visibility externally and fix css 2018-10-16 13:02:22 -04:00