Commit graph

84 commits

Author SHA1 Message Date
Benjamin Wheeler
341428ce50
storage.js can use PROJECT_HOST env setting (#2146) 2018-10-09 09:59:04 -04:00
Ben Wheeler
478a30efcb pass project title to GUI, and disable submit when editing title 2018-09-05 18:38:19 -04:00
Linda
68c7616a25 remove now obsolete truncate library 2018-08-22 15:10:19 -04:00
Ben Wheeler
097fb66955 currentStudioIds now an array; reverted a few changes 2018-07-31 15:00:56 -04:00
Connor Hudson
1842be2f1a Add l10n strings for extension chips 2018-06-22 09:16:20 -04:00
Connor Hudson
058b851823
Remove outdated comment from storage.js
The issue pointed to was fixed by a separate commit.
2018-06-20 13:53:02 -04:00
Connor Hudson
bd22d573b6 extension-info.js -> extensions.js 2018-06-19 16:18:08 -04:00
Connor Hudson
7539e74436 Add extension icons, extension info object 2018-06-19 16:13:25 -04:00
Connor Hudson
ca91294b31 Add ScratchStorage subclass for getting project JSON 2018-06-19 11:24:54 -04:00
chrisgarrity
80de164d02
Handle See inside button (#1890)
* Handle See inside button

Import GUI reducers, initial state and middleware (throttle).

Update render to handle state and middleware.

Remove preview mode state and use scratchGui.mode from redux instead.

URL is getting updated, and mode will be updated based on URL. However, the history needs work - it doesn’t work with the modal back.

* Update to latest GUI

This is the minimum version of GUI that is needed for see-inside

* Really remove cruft.
2018-05-24 16:23:07 -04:00
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
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
9a3358b35c provide a default opts if it’s undefined 2017-09-18 14:40:52 -04:00
Matthew Taylor
4175c119d2 apply path explicitly rather than in defaults
This should fix #1455 by preventing the path from being changes via opts passed in, even though we don’t pass in a `path` anywhere.
2017-09-18 11:44:06 -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
Ray Schamp
84a37a671f Remove SmartyStreets API
We are so lax with this that it's not actually helping us, and we don't have a plan with them anymore.
2017-07-13 10:44:50 -04:00
Matthew Taylor
7540ee45e3 loosen restrictions on smartystreets check
re-fixes #828 by loosening restrictions on the check once again (see https://smartystreets.com/docs/us-street-api#match-strategy)
2016-10-06 16:36:27 -04:00
Ray Schamp
2d22f6fa3d Merge pull request #912 from rschamp/bugfix/http-only-session
Remove interactions with session cookie
2016-09-19 12:04:17 -04:00
Matthew Taylor
2db7097b9b Merge pull request #839 from mewtaylor/hotfix/gh-828
[Develop] Fix GH-828: check street number range for address
2016-08-12 15:15:53 -04:00
Matthew Taylor
ccfde96f67 use new match option instead of header
so that it works in IE9 too.
2016-08-12 14:40:26 -04:00
Matthew Taylor
ea91b3d885 Remove declaration of defaultsDeep
Got lost in the merge, apologies.
2016-08-11 15:55:58 -04:00
Matthew Taylor
e18e320231 Merge branch 'hotfix/gh-828' into develop
* hotfix/gh-828:
  Make `X-Requested-With` overridable
  use `defaults` again
  Only apply `X-Requested-With` to same domain
  check street number range for address

# Conflicts:
#	src/lib/api.js
2016-08-11 15:45:05 -04:00
Matthew Taylor
d6d5fa0f8a Make X-Requested-With overridable
thanks @rschamp!
2016-08-11 15:20:54 -04:00
Matthew Taylor
4dc85b1bc4 use defaults again
deep is no longer necessary with the `headers` change
2016-08-11 15:20:54 -04:00
Matthew Taylor
fa2c326955 Only apply X-Requested-With to same domain
it breaks on cross domain
2016-08-11 15:20:54 -04:00
Matthew Taylor
9c88f92f44 check street number range for address
rather than exact address, so that we can more flexibly allow outdate post office data
2016-08-11 15:20:54 -04:00
Matthew Taylor
2fc62cba13 Merge pull request #830 from mewtaylor/hotfix/gh-828
[Develop] Fix GH-828: check street number range for address
2016-08-11 08:46:07 -04:00
Matthew Taylor
4d9fe86f40 check street number range for address
rather than exact address, so that we can more flexibly allow outdate post office data
2016-08-10 15:33:17 -04:00
Technoboy10
a8b26b1a1c experiment with removing content display from scss 2016-07-26 11:06:21 -04:00
Ray Schamp
b89d644573 Fix JSON response parsing in IE
Fixes #654

IE does not honor responseType: 'json', and will not parse responses as JSON unless json data is present in the request. For some reason this issue can also be solved by including a `json` attribute on the xhr request, but if that's present, url encoded form data is overwritten with the contents of the json.  So just try to parse the response ourselves if it looks like it wasn't parsed.

See https://github.com/Raynos/xhr/issues/123
2016-07-03 15:54:58 -04:00
Matthew Taylor
04aa7e01ef check for the null value in get
thanks @rschamp!
2016-06-30 11:40:05 -04:00
Matthew Taylor
794c3e2cba Set null contents to null instead of error throw
Before, if a cookie didn't exist, it would throw an error, not causing permissions/tokens to change to empty values. This fixes that (and #626) by setting the value to undefined instead.
2016-06-30 11:27:46 -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
8646bd84b3 Submit the rest of the fields when registering 2016-06-17 11:01:34 -04:00
Ray Schamp
26e1ee553b Add method to api for submitting forms
Some of our legacy endpoints expect this style rather than json.

Also clean up the way useCsrf works — don't always set json attribute to an empty object.
2016-06-16 17:24:31 -04:00
Matthew Taylor
626b3f008e Merge branch 'develop' of https://github.com/LLK/scratch-www into issue/gh-543-teacher-banner
* 'develop' of https://github.com/LLK/scratch-www: (29 commits)
  Add explore redirects
  Allow access to 2014 and 2015 pages
  use route aliases for generalizable route patterns
  remove `/components` from `routes.json`
  Remove Make it Fly banner
  Fix issues in FAQ of /developers page.
  move shuffle to utility module
  fix error with shuffleArray function
  add shuffleArray function, shuffle most loved and most remixed
  use `image` to get studio thumbnail
  quick formatting fix for box header on search
  Fix merge issue
  Add localizations, minor style changes
  Removed rows from grid, changed explore tabs
  Removed extraneous image file
  Whitespace added
  Small fix
  Support for studios
  Refactoring, new grid component
  Style changes
  ...

# Conflicts:
#	src/views/splash/splash.jsx
#	src/views/splash/splash.scss
2016-06-15 09:45:05 -04:00
Ray Schamp
cfa85427b1 Add address validation 2016-06-14 17:29:30 -04:00
Ray Schamp
f8037f6767 Lint 2016-06-14 17:29:30 -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
Ray Schamp
56e16bc0dc Actually provide every state in world choice 2016-06-14 17:29:30 -04:00
Ray Schamp
f126a71336 Use iso-31660-2 package for country data 2016-06-14 17:29:29 -04:00
Matthew Taylor
5b73c4192d change name to getUnsignedValue
thanks @rschamp!
2016-06-13 10:06:43 -04:00
Connor Hudson
fde193ca06 move shuffle to utility module 2016-06-13 09:40:32 -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
Matthew Taylor
a860b27941 Some updates to the redux structure
1. split `auth.js` up so it's 1 reducer per file
2. consolidate the conference schedule reducers
3. make conference reducer names more descriptive
4. add error handling for `body === 'undefined'`

Thanks @rschamp for all the help!
2016-05-19 16:55:25 -04:00
Matthew Taylor
d69de477a1 Merge branch 'develop' of https://github.com/LLK/scratch-www into feature/conference-schedule
* 'develop' of https://github.com/LLK/scratch-www: (32 commits)
  Lint
  Bundle all locale data
  Don't bundle polyfills
  Set up Raven within init.js
  Prefix privacyPolicy message string
  Exclude minified javascript from linting
  One space more
  Changes "interfacesto" to "interfaces to"
  Remove tag target
  Filter before mapping to avoid returning undefined
  Fix Pass condition for "static" routes
  Spacing2
  Mangling is the default
  Spacing
  Update for typography fixes
  Cherry pick PR #476 into master
  Add invisible spacer to anchored sections
  For Developers
  Lint JSON, expand and simplify lint step
  Fix banned user redirect
  ...

# Conflicts:
#	src/redux/actions.js
#	src/redux/reducer.js
2016-05-19 13:25:36 -04:00
Matthew Taylor
b969c4e2ed Split reducers into separate files
Use a model of reducer/action files for each component that has them, and make `reducer.js` be the one that imports and configures all of them. This modeling is based on a few examples I've seen which seemed to work for our current case, but I'm totally fine with splitting actions and reducers into separate directories if we'd like too.
2016-05-19 11:34:28 -04:00