Commit graph

66 commits

Author SHA1 Message Date
chrisgarrity
b8326a3d57
Feature/preview project2 (#1856)
* Add user-session awareness
  - only show remix button if user is logged in (TBD: probably will want to hide if project creator == user)
* decorate text with @mentions and #hashtags
* Add studios, loves, favs
* In-place editing of title and description if current user is author and project shared (with validation)
2018-04-24 11:00:47 -04:00
chrisgarrity
1c6b0dd64c Cleanup
Fixing lint problems and removing (most) unused code. I left user and session as they will get used soon even though they aren’t currently.
2018-03-15 17:40:16 -04:00
chrisgarrity
f836c6e3a8 Adding in remix metadata
- Moved preview state into redux
- Gets remix credit if the project is a remix
- Shows up to 5 remixes (direct children?)
- handles empty remixes result (it’s not an array)
- Added Column component - based on Grid, but doesn’t use frameless to set width.
- allows trailing ‘/‘ on the URL
- cleaned up conditional content
2018-03-14 15:50:27 -04:00
Ray Schamp
590f505a61 Revert "Merge pull request #1788 from LLK/revert-1775-hotfix/es6-upgrade"
This reverts commit 1b1b396e92, reversing
changes made to a144bab0e6.
2018-01-30 11:53:12 -05:00
Ray Schamp
46511e1253
Revert "[Develop] Upgrade to ES6" 2018-01-30 09:54:45 -05:00
Matthew Taylor
6d1f2fbccd initial es6 commit 2018-01-19 14:06:26 -05:00
Matthew Taylor
380be6b5c1 copy state before assigning values
otherwise, redux won’t recognize a change in values
2018-01-09 16:44:32 -05:00
Matthew Taylor
91a0e865ad Use new activity endpoint
This also moves homepage row retrieval into redux to further move towards using redux to handle functionality. This implements #1628.
2017-11-15 12:49:23 -05:00
Matthew Taylor
18f82fce3f Merge branch 'issue/gh-1546' into develop
* issue/gh-1546:
  Make api request on filter change
  render load more even if messages not there

# Conflicts:
#	src/views/messages/container.jsx
#	src/views/messages/presentation.jsx
2017-10-26 08:41:54 -04:00
Matthew Taylor
361afaa937 Make api request on filter change
This fixes #1546 by using an updated api endpoint that accepts filter arguments.
2017-10-24 13:10:32 -04:00
Matthew Taylor
75217978c1 Switch message count to new endpoint 2017-10-03 16:37:00 -04:00
Matthew Taylor
1dffc08445 change the way invites are assigned
assign invites directly to the state rather than by defaults in order to ensure empty objects can be part of an update
2017-09-08 10:24:39 -04:00
Matthew Taylor
7e85d2c731 fix invite for initial 2017-09-08 09:38:47 -04:00
Matthew Taylor
b82d312dd8 make invite an array instead of an object
When trying to clear the invite, because invite is currently an object, it’s getting the state’s existing invite re-applied via `defaultsDeep`. Making it an array should solve this issue
2017-09-08 09:29:46 -04:00
Matthew Taylor
7945a7eff1 only dispatch count if the user is present
this prevents a console error
2017-09-06 14:25:44 -04:00
Matthew Taylor
2bd9b184c5 Fix GH-[1505, 1507]: hide message counter on 0 (#1510)
* Hide messages counter when at 0

fixes #1507

* check for body before looking at success

fixes #1505
2017-09-06 10:05:14 -04:00
Matthew Taylor
5772eed8f7 use lodash instead of assign
this fixes #1500, since lodash works in ie11 but `assign` does not
2017-09-05 12:28:01 -04:00
Matthew Taylor
74400b0599 add comments to redux methods 2017-09-05 10:03:48 -04:00
Matthew Taylor
71b93cb207 reduce unread count on successful admin message dismiss 2017-09-01 11:07:21 -04:00
Matthew Taylor
3dee0e46d2 continue to use proxy msg count for now 2017-09-01 10:20:18 -04:00
Matthew Taylor
779c42717b I think I misunderstood the xhr docs 2017-08-31 23:39:49 -04:00
Matthew Taylor
3022a565ce json-encode body 2017-08-31 18:39:03 -04:00
Matthew Taylor
9ace64fda7 add csrf for message clear requests 2017-08-31 18:24:58 -04:00
Matthew Taylor
3dd768f2f6 GH-1361: Implement Notifications Page (#1487)
* start work on www page
committing out of paranoia.
including changing splash page endpoints

* updates from feedback

thanks @rschamp! This includes:

1. splitting out messages list into a separate component (for clarity)
2. some comment/formatting adjustments for the api calls
3. removal of an extraneous property in emoji-text

* remove duplicate string declaration

* use object.assign instead of defaults deep

we don’t need deep defaults

* fix react warnings
2017-08-31 17:05:22 -04:00
Matthew Taylor
19757ef730 Update details uri to have 2016 path 2017-02-15 08:44:28 -05:00
Matthew Taylor
cbd983baf8 Merge pull request #932 from TheGrits/patch-3
Fix gh-678: Retain Search Term
2016-12-12 22:52:38 -05:00
The_Grits
0b2c1fff1a Squish 2016-12-12 16:01:06 -05:00
The_Grits
d9df101a66 One Commit More (#23)
* Update reducer.js

* Update search.jsx
2016-11-07 11:02:33 -05:00
The_Grits
8be3e11486 Travis and Other Stuffs 2016-10-31 10:19:35 -04:00
The_Grits
9f2cda0eaa Bugs and Connections 2016-10-31 10:05:08 -04:00
Matthew Taylor
7e04ae1088 Add w/o slash to the whitelist paths
as recommended in https://github.com/LLK/scratchr2/pull/4127#issuecomment-256484893
2016-10-27 08:38:17 -04:00
The_Grits
379ac78551 Navigation Redux 2016-10-26 10:20:16 -04:00
The_Grits
f77b22b07b Update with Reducer 2016-10-20 21:30:32 -04:00
Matthew Taylor
dc48dbb34a use var not const
We’re not at es6 yet. My baaaaaaaaaaddddd
2016-10-19 15:41:56 -04:00
Matthew Taylor
e1e9455866 Don’t redirect banned user on comm. guideliens
Goes along with https://github.com/LLK/scratchr2/pull/4127.
2016-10-05 17:49:18 -04:00
The_Grits
195930bc53 Merge! 2016-09-30 13:54:34 -04:00
The_Grits
d90f62c316 Create navigation.js 2016-09-30 13:48:57 -04:00
Ray Schamp
e44e958fe0 Move permissions storage to client-side cookie
Instead of retrieving the permission from the session cookie, store permission data from /session/, and cache it in a cookie.  On subsequent page loads, the permission information will be retrieved from the cookie more quickly than the /session/ endpoint returns. When the session changes, the cookie and permissions state is updated to reflect the new state.
2016-09-08 12:53:05 -04:00
Ray Schamp
a497fed338 Remove token storage
We're not using it yet, and it won't be coming from the cookie when we do.
2016-09-08 12:48:07 -04:00
Ray Schamp
0b1f708400 Don't redirect to password reset on complete_registration 2016-07-27 10:27:31 -04:00
Ray Schamp
d83df730c8 Redirect students that must reset their password
Fixes LLK/scratchr2#3878
2016-07-26 16:40:05 -04:00
Ray Schamp
7e330bfb67 Redirect to student registration update view
Previously requests to /session/ would return a signal to redirect, but we need /session/ to complete registration. So check if we should redirect when we retrieve the session.

Also update this behavior for banned users.
2016-07-21 21:08:07 -04:00
Matthew Taylor
5cc6eb3ecb use empty string if no cookie value found
redux doesn't like getting null values for actions, so give empty ones

/cc @rschamp
2016-06-30 15:29:53 -04:00
Matthew Taylor
7bb52c25fe move permissions checks to mirror session more
thanks @rschamp!
2016-06-28 14:25:11 -04:00
Matthew Taylor
9d6fb63d18 Merge branch 'feature/teacher-registration-flow' of https://github.com/rschamp/scratch-www into feature/teacher-registration-flow
* 'feature/teacher-registration-flow' of https://github.com/rschamp/scratch-www: (46 commits)
  Add serverside email validation
  Clean up
  Move registration step to main component
  Submit the rest of the fields when registering
  This help text is redundant now
  Fix organization "other" field enablement
  Get the form creating regular accounts
  Add method to api for submitting forms
  Update language chooser for formsy
  Add missing string
  Add progress indicators
  Style pass
  Remove unused label component
  Remove unused mixin factory
  Fixup api refactor
  Add serverside username validation
  L10n pass
  Explain the GeneralError component
  Add help text when a field is not required
  L10n WIP
  ...

# Conflicts:
#	src/l10n.json
#	src/views/splash/splash.jsx
2016-06-17 15:32:49 -04:00
Ray Schamp
d7df1e980f Move api mixin to lib, remove mixin
The mixin doesn't gain us anything except complexity
2016-06-14 17:29:30 -04:00
Matthew Taylor
5b73c4192d change name to getUnsignedValue
thanks @rschamp!
2016-06-13 10:06:43 -04:00
Matthew Taylor
ac17850491 Add teacher banner to splash page
This only shows if the logged in user is a teacher, and persists for teachers.
2016-06-08 13:47:11 -04:00
Connor Hudson
8022d76aaa Merge pull request #553 from technoboy10/gh548-signout
Fix GH-548: Sign out should take effect before reload
2016-06-06 09:06:36 -04:00
Connor Hudson
75ce6378a2 remove comment 2016-06-06 08:46:28 -04:00