Commit graph

2168 commits

Author SHA1 Message Date
Paul Kaplan
9ed3ecc7bb Split up the backpack options and tie visibility to isLoggedIn 2018-11-08 13:19:12 -05:00
Paul Kaplan
c62470150b
Merge pull request #2290 from paulkaplan/project-not-available
Add "project not available" view for when project body cannot be loaded
2018-11-08 12:58:37 -05:00
Paul Kaplan
ae05f07e07 Fix project not available flag setting and catch 404 responses 2018-11-08 08:43:36 -05:00
Paul Kaplan
315c8b78fc Add "project not available" view for when project body cannot be loaded
This happens when the project id does not exist, or is not visible to the given user.
2018-11-07 16:32:12 -05:00
Ray Schamp
e2795ec4d6
Merge pull request #2284 from rschamp/bugfix/offline-homepage
Avoid displaying an error when /news returns a 500
2018-11-07 17:57:10 +00:00
Paul Kaplan
80028bfea5
Merge pull request #2288 from paulkaplan/ip-muted-comments
Add IP Mute message to project comment errors
2018-11-07 11:47:44 -05:00
Paul Kaplan
4105e88cfd Add IP Mute message to project comment errors 2018-11-07 10:58:07 -05:00
chrisgarrity
b5d551b705 Add new strings in preparation for Hour of Code 2018-11-06 16:15:54 -05:00
Ray Schamp
037078d623 Avoid displaying an error when /news returns a 500
This situation probably occurs most frequently when running dev servers while offline, but could also happen if the API is having issues. 500 responses from the API should not take down the homepage so drastically, and are also sometimes unavoidable while working offline.
2018-11-06 12:25:04 +00:00
Andrew Sliwinski
7721418165
Merge pull request #2269 from DeleteThisAcount/patch-1
Fix typo on micro:bit landing page
2018-11-05 13:00:19 -05:00
Ben Wheeler
7aae4219ec make share banner appear only if user has the power to share this project 2018-11-01 14:19:28 -04:00
DeleteThisAcount
ab9004f901
fix small typo 2018-10-31 17:52:16 +01:00
Benjamin Wheeler
e14cb0f8f2
Merge pull request #2250 from benjiwheeler/share-button-icon
removed erroneous share button icon
2018-10-30 22:29:19 -04:00
Karishma Chadha
950f13a35a
Merge pull request #2245 from kchadha/cloudhost
Configure Cloud Host
2018-10-30 14:26:17 -04:00
Ben Wheeler
78f059e8b4 removed erroneous share button icon 2018-10-29 17:30:53 -04:00
chrisgarrity
b629d28a6d
Merge pull request #2242 from chrisgarrity/issue/2030-gui-layers
remove obsolete code
2018-10-29 09:59:50 -04:00
Benjamin Wheeler
183bdccdae
Merge pull request #2223 from sehgalvibhor/develop
Responsive about page!
2018-10-29 06:59:56 -04:00
Karishma Chadha
e771e91164 Configure cloud host and pass it as a prop to the gui. 2018-10-29 01:05:36 -04:00
Vibhor Sehgal
93d847271d Travis Fix 2018-10-29 08:08:13 +05:30
chrisgarrity
9dd13dac74 remove obsolete code
Preview doesn’t need to set a z-index (the first version was trying to overlay gui on top of the project view).
2018-10-26 15:11:46 -04:00
Paul Kaplan
f2490baa16
Merge pull request #2239 from paulkaplan/fix-comments-id
Use #comments-id instead of #comment-id for fetching single comments
2018-10-25 16:56:27 -04:00
Benjamin Wheeler
cff5733833
Merge pull request #2234 from benjiwheeler/isshared
pass isShared to gui
2018-10-25 15:57:07 -04:00
Benjamin Wheeler
8653e358b1
Merge pull request #2232 from benjiwheeler/dont-get-extensions
moved getExtensions out of constructor, and out of projectInfo response
2018-10-25 15:56:39 -04:00
Paul Kaplan
32f0999bb0 Use #comments-id instead of #comment-id for fetching single comments 2018-10-25 15:53:34 -04:00
Paul Kaplan
e563254c8f
Merge pull request #2231 from paulkaplan/comment-linking
Decorate comment text to add @username links and scratch-domain links
2018-10-25 15:18:56 -04:00
Paul Kaplan
f133f29353 Fix form styling for project edit fields 2018-10-25 11:38:27 -04:00
Paul Kaplan
209c8da9f7 Keep each input in its own formsy wrapper to improve performance
Having Formsy around the entire page was causing re-renders to happen when you typed into an input, when really just that component needed to re-render.
2018-10-25 10:27:54 -04:00
Vibhor Sehgal
04adcb5063 Retaining Flex Layout 2018-10-25 09:53:28 +08:00
Ben Wheeler
c4de63d93a pass isShared to gui 2018-10-24 18:13:57 -04:00
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
Ben Wheeler
dd07e46c6a moved getExtensions out of constructor, and out of projectInfo response 2018-10-24 15:38:18 -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
9066686c2b Decorate comment text to add @username links and scratch-domain links 2018-10-24 11:25:32 -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
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
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
Vibhor Sehgal
733c3d1bff Responsive about page. 2018-10-23 11:29:44 +08: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
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