Commit graph

55 commits

Author SHA1 Message Date
Chris Duarte
b09dbbb79c PLT-5493 Add a profile scene that shows user information (#287)
* PLT-5493 React Native: Add a profile scene that shows user information

* Review feedback
2017-02-24 10:17:05 -03:00
Chris Duarte
4f2d769766 PLT-5541 Autocomplete mentions in post textbox (#266)
* WIP channel autocomplete

* Channel mentions

* Feedback Review
2017-02-20 18:19:11 -03:00
Chris Duarte
3b7a6df617 PLT-5530 Render placeholder icons + metadata for file attachments in posts list (#249)
* Add icons for file types

* Compress image files for file type icons

* Add constants for file types

* Add utils for file metadata

* Add actions & reducers for fetching file attachments

* Render file attachments in posts

* Add reducers for handling files requests

* Refactor getFileType in file utils

* Refactor getFileIconPath in file utils

* Refactor getFormattedFileSize in file utils

* Trim trailing whitespace in getTruncatedFilename

* Style file attachment metadata

* Remove entity store reducer for files fetch failure

* Change filesForPost to fileIdsForPost in files store

* Use a selector for getFilesForPost

* Memoize getFilesForPost selector

* Dispatch postId with getFilesForPost

* Add test for getFilesForPost

* Upload seed file in getFilesForPost test

* Display correct icon for image attachments

* Fix reducers for receiving files for post

Expect response data to be array not object

* Style attachment post

* Merge headers (defaults + opts) in Client.doFetch

* Upload file as FormData

* Use form-data lib instead of built-in polyfill

* Associate file with post in getFilesForPost test

* Improve assertions in getFilesForPost test

* Check for createPost failure in getFilesForPost test

* Use correct post id in getFilesForPost test

* Use client not action to create post in getFilesForPost test

* Fix file upload in getFilesForPost test

* Add assertion for name of uploaded file

* Update attachment post style

* Fix spelling of loadFilesForPostIfNecessary

* Remove eslint-disable no-magic-numbers from file_utils.js

* Remove unused index prop from FileAttachment

* Clarify code for merging headers in Client.getOptions

* Dynamically truncate file attachment names

* Extract component for FileAttachmentIcon

* Use white bg for FileAttachmentIcon to match webapp styles

* Match webapp styles for file attachment borders

* Move file icon path lookup to FileAttachmentIcon

* Use more logical ordering for file type lookup
2017-02-17 17:40:40 -05:00
Harrison Healey
1115d882ca PLT-5566 Added clientside handling to automatically show direct channels (#270)
* Added TestServerUrl config setting

* Added clientside handling to show direct channels in the sidebar when a DM is received
2017-02-17 10:53:46 -05:00
enahum
61576c9474 PostList date separator to match webapp (#264)
* PostList date separator to match webapp

* Remove preference change test
2017-02-16 09:11:00 -05:00
enahum
a97238f75c Removed channel_viewed websocket event (#254) 2017-02-15 14:08:41 -03:00
enahum
51e8ee6ea2 More Direct Messages scene (#244)
* More Direct Messages scene

* Adding search_bar.js to mock tests

* Feedback review

* Address feedback review 2
2017-02-14 11:49:41 -05:00
Harrison Healey
249312b852 PLT-5252 Added Thread view (#239)
* Added Thread view

* Fixed added unit test

* Fixed copyright date on added file

* Moved scene-specific selector into service directory
2017-02-13 18:08:26 -03:00
Chris Duarte
c370e895bd Mention autocomplete (#242)
* Mention autocomplete

* Review feedback
2017-02-13 16:07:50 -05:00
Chris Duarte
088a2c7737 Navigation Drawer and Modal (#220)
Navigation header now responds to theme changes
Improve channel selection transition
Implement navigation modal
Reword options modal
2017-02-08 12:16:24 -08:00
enahum
b3b3d9a39a Squashing several bugs (#221)
* Squashing several bugs

* Fix websocket tests
2017-02-08 10:28:27 -08:00
Chris Duarte
ce58429a21 Reworking navigation (#212)
* Reworking navigation

* Fixed navigation testing and lint errors
2017-02-02 16:13:25 -05:00
enahum
bfd70f742c Modal with options (#179)
* modal options and channel long press

* PureComponent optimization (#183)

* Bug fix when leaving the current channel

* Rebased with new navigation

* Add disabled drawer to unit test

* re-organize modal up in the stack and controlled by redux

* renaming modalOptions to optionsModal
2017-01-30 08:41:14 -05:00
enahum
dd073f173e Update channel header/purpose when current channel (#173)
* Update channel header/purpose when current channel

* Add unit tests for update header and purpose
2017-01-24 11:49:04 -05:00
Harrison Healey
cea81f6497 Reorganized navigation (#181)
* Moved ChannelDrawer into its own scene

* Moved RightSideMenu to a separate route

* Moved title back above scenes

* Moved right side menu into a separate scene

* Reorganized navigation so that it centers around ChannelView when logged in

* Stopped using NavigationExperimental to manage drawers

* Fixed copyright date

* Added unit tests for navigation drawers

* Renamed RightSideMenu to RightMenuDrawer

* Removed unnecessary ChannelDrawer style
2017-01-24 11:56:35 -03:00
Harrison Healey
9d51a3b970 Added whitelabeling support using assets/override (#156) 2017-01-05 16:32:24 -03:00
enahum
81526fbb09 Channel drawer (#154)
* Channel list drawer
* Get channels by category
* Fix and connect websocket
* Fix Select first team using the team members

* create loadMe and fix login actions to loads the teams

* Add android back button handler for the channel drawer

* Channel drawer styling and functionality

* Mark channel as viewed and fixed reset unread counts

* Unread above/below indicators

* Improve performance replacing ScrollView with ListView

* Fix unread indicators

* Addressing review feedback
2017-01-03 19:49:28 -03:00
enahum
aa5a77ae86 Use the new API for view channel (#155)
* Use the new API for view channel

* Fix view channel on websocket events
2016-12-29 11:31:11 -03:00
Harrison Healey
4ecd3758e7 Render posts for the current channel (#153)
* Added selectChannel action

* Fixed selected team not being cleared on logout

* Fixed posts and postsByChannel not being initialized correctly

* Added basic post rendering

* Renamed selectors files to be plural

* Removed empty file

* Fixed unit tests after merge

* Removing unnecessary code
2016-12-23 10:55:33 -03:00
enahum
8243eda444 Improved unit tests (#151) 2016-12-22 13:07:23 -03:00
enahum
7e426b6029 Add WebSocket support (#144)
* Add WebSocket support

* fix unit tests

* Add actions to websocket and fix unit tests
2016-12-21 12:54:23 -05:00
Harrison Healey
0d5215a8b7 Fixed create direct channel route to use a proper team id (#146) 2016-12-20 15:54:23 -03:00
Harrison Healey
8e59ea606e Refactored post store to store posts by their IDs (#142)
* Added hook to tests to catch uncaught promise rejections

* Refactored post store to store posts by their IDs

* Fixed post store when logging out
2016-12-19 14:37:54 -03:00
enahum
d2f2678880 Reauthenticate from stored token when app is reloaded (#137)
* Reauthenticate from stored token when app is reloaded

* Address feedback
2016-12-15 13:17:26 -05:00
Harrison Healey
bd3bd45c36 Added deep freeze of stores in dev mode (#135)
* Added deep freeze of stores in dev mode

* Stopped deletePost and reducePosts reducer functions from mutating the store
2016-12-13 17:13:41 -03:00
Harrison Healey
5cc43d5a9f Made all unit tests run again (#132) 2016-12-13 12:10:33 -03:00
enahum
aa01be831f include posts into store (#125)
* include posts into store

* addressing feedback
2016-12-13 09:07:16 -05:00
Harrison Healey
61c4d8b585 Added basic theming support (#131)
* Moved all view action types into a single file

* Moved preferences into their own constants section

* Added basic theming support
2016-12-12 21:05:59 -03:00
Harrison Healey
155a923cd0 Added preferences to redux store (#124)
* Disabled broken ESLint rule

* Added preferences to redux store

* Re-enabled all unit tests

* Fixed code referencing users.myPreferences

* Stopped exporting dispatcher from actions/helpers
2016-12-12 20:42:26 -03:00
enahum
e2f3f7b803 project folder structure (#107)
* project folder structure

* Moving store to be called from app folder
2016-12-09 10:34:17 -05:00
enahum
d27122c69b enable all tests and fix createTeam test (#106) 2016-12-08 18:17:33 -03:00
enahum
b1474a37b7 Include team to the store (#103)
* Include team to the store

* addressing feedback

* Fix getTeamMember
2016-12-08 18:01:55 -03:00
enahum
4b636bfefc Remove unnecessary moreChannels from store (#104)
* Remove unnecessary moreChannels from store

* Remove profile fetching on DM creation
2016-12-08 11:36:28 -05:00
enahum
f487bb4014 Remove pagination for profiles in the store (#105) 2016-12-08 11:36:07 -05:00
Harrison Healey
8732febd8c Removed react-native-router-flux and added custom navigation logic (#102)
* Removed react-native-router-flux and replaced it with custom navigation

* Split Logout component to have a container

* Replaced RootContainer with RootLayout

* Removed lodash from package.json

* Removed unnecessary state from Logout component

* Added placeholder for RHS search

* Renamed routes to scenes and moved some logic to there

* Added Root route to handle any initialization on app load

* Added unit tests for navigation reducer

* Fixed eslint errors

* Removed commented out code from Router

* Renamed Channel route to ChannelView to avoid confusion

* Used a separate index.js for component containers

* Simplified mapStateToProps for RootLayoutContainer

* Removed file accidentally added in merge conflict
2016-12-08 12:37:38 -03:00
enahum
9125d0cac2 Initial Redux Store (#84)
* Moved SelectServer view state into store

* Moved view state for Login to stores

* Renamed RequestStatus values

* Merged duplicated view state for login

* initial redux store

* Fix eslint

* user store and force logout when necessary

* channel store

* address feedback

* Revert naming the property of data
2016-12-06 15:11:40 -05:00
Harrison Healey
45f8a56d15 Fixed unit tests for the other changes I've made recently (#80)
* Removed mocking from client tests

* Updated Client tests to remove Client.setTeamId

* Fixed actions/general.test.js

* Updated test/reducer/channel.test.js for the updated store structure

* Commented out general reducer tests until the store structure is more finalized

* Properly used the team ID when creating a channel
2016-11-22 11:46:50 -05:00
Harrison Healey
71c0707a90 Stopped aliasing action types 2016-11-09 10:40:20 -05:00
Mike Piccolo
25f284a068 Add logout to the topnav (#45)
* WIP

* Remove session token after logout.

* Add logout reducer test

* Pop stack to login

* Use newProps and doFetchWithResponse

* Setup the reducers to clear the store
2016-10-20 11:49:03 -07:00
Mike Piccolo
31206b397b Cover general and device reducers 2016-10-18 23:17:27 -07:00
Mike Piccolo
8e3ba08ad3 Initial reducer tests 2016-10-18 23:17:27 -07:00
Harrison Healey
543ccb8fe6 Switched client.js to fully use Promises (#23)
* Made sanity tests run without an internet connection

* Removed onRequest parameter from Client methods

* Switched client.js to fully use Promises

* Fix mock response for login

* Fixed test_helper.js to actually use the configured url
2016-10-18 10:46:30 -04:00
Thomas Hopkins
829972694b Add functionality for fetching + selecting teams & channels (#17)
* WIP-working-routes

* Fix imports

* WIP

* Remove unused proptypes & imports from SelectTeam

* Appease eslint

* Disable non-applicable eslint rules in routes & styles

* Change endpoint for fetching teams

* Handle failure to fetch teams

* Fix proptypes in ErrorText

* Add action for selecting team

* Allow user to select a channel

* Save exact versions of npm packages

* Add lodash

* Fetch teams for user to select from

* Don't require onProceed prop on SelectServer

* Abstract out the api logic from actions

* Handle fetch implementation discrepancy when parsing headers

* Remove example components

* Appease eslint

* Fix disabling of fetch-mock

* Remove response headers parsing hack

* Set mock fetch flag in config.json
2016-10-17 15:47:47 -04:00
Thomas Hopkins
8611b3e28a Use fetch-mock to mock requests in tests (#18)
* Use fetch-mock to mock requests in tests

* Use flag to enable/disable fetch-mock
2016-10-17 14:37:18 -04:00
Harrison Healey
ebf6a95561 Added basic config file (#20)
* Added basic config file

* Replaced Object.assign with spread
2016-10-17 11:38:59 -04:00
Harrison Healey
fa30d29449 Removed isomorphic-fetch from non-test code (#8) 2016-10-12 18:02:12 -04:00
Harrison Healey
8c3f60e41d Changed actions tests to use TestHelper 2016-10-12 11:30:05 -04:00
Harrison Healey
15a44ad453 Fixed actions unit tests and dispatching them 2016-10-11 17:34:15 -04:00
Harrison Healey
2cfc210318 Moved client tests into a single folder 2016-10-11 16:44:15 -04:00
Harrison Healey
f7dd914562 Refactored Client methods so that arguments come before callbacks to match webapp 2016-10-11 16:41:03 -04:00