Commit graph

36 commits

Author SHA1 Message Date
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
Chris Duarte
ce58429a21 Reworking navigation (#212)
* Reworking navigation

* Fixed navigation testing and lint errors
2017-02-02 16:13:25 -05:00
enahum
71b2ecd394 Platform dependent search bar and ui fixes (#205)
* Platform dependent search bar and ui fixes

* Set events in default props

* Update NOTICE.txt

* Channel info favorite (#210)

* Enable toggling of favorite channel from channel_info

* Change this binding

* Handle favorite toggle with state

* feedback review

* removed unnecessary view
2017-02-01 11:38:32 -03:00
enahum
a7d7c4b459 Reset cache when starting the app with make run (#207) 2017-02-01 09:32:17 -05:00
Harrison Healey
0996644512 Added a polyfill for Reflect to support Android devices (#186)
* Added a polyfill for Reflect to support Android devices

* Added harmony-reflect to NOTICE.txt
2017-01-25 11:09:25 -05:00
enahum
b8dd3ec359 Fix channel selection when switching teams (#167)
* Fix channel selection when switching teams

* Making the listview channels to already have if its current
2017-01-20 13:41:48 -05:00
enahum
1566a79c93 Fastlane for Android and ios (#165) 2017-01-19 09:35:40 -05: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
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
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
Chris Duarte
19b7918679 Use babel-plugin-module-resolver to fix imports from project root (#145) 2016-12-20 16:01:15 -05:00
Harrison Healey
384667ece1 Added NOTICE.txt (#136)
* Added NOTICE.txt

* Add creators to intro sentence

* Removed react-addons-pure-render-mixin from NOTICE.txt since it's part of react

* Copied fbjs keymirror into utils

* Renamed deepFreezeAndThrowOnMutation to deep_freeze

* Fixed merge conflict
2016-12-16 19:42:08 -03:00
enahum
228b1be76f Prevent eslint from passing with exclusive tests (#133) 2016-12-13 12:57:57 -03: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
86b33e0164 Added initial version of MainView/MainContainer 2016-11-09 12:52:17 -05:00
David Meza
231fda1160 Add vector icons (#34)
* WIP: Add vector Icons with Android support

* Added IOs support for icons. Linked XCode dependencies.

* Add icon to team selection list as a usage example/test
2016-10-20 17:42:31 -07:00
Harrison Healey
1a0c741fcd Added Intl polyfill for platforms that don't support it (#49) 2016-10-20 15:54:55 -07:00
Harrison Healey
8f727e0ebd Added react-intl for internationalization (#31)
* Added react-intl

* Moved all displayed strings into en.json

* Add spanish locale data so we can test switching locales
2016-10-19 10:56:24 -07:00
Thomas Hopkins
99140c6ece Check for npm, xcode, & android env in makefile (#30)
* Avoid clobbering config.secret.json if already exists

* Clear npm cache when running make clean

* Fail make if npm is not installed

* Wrap rn run commands so local rn cli is used instead of global

* Separate run commands for ios & android

* Fail make run-ios if xcode isn't installed

* Check android env in make run

* Fix make check for config.secret.json
2016-10-18 23:01:54 -07:00
Thomas Hopkins
d4a98c082a Style views for SelectServer, Login, SelectTeam, & ChannelsList (#27)
* Allow user to change switch between teams & channels

* Add react-native-button

* Style SelectTeam view

* Reuse SelectTeam styles in SelectServer & Login

* Reuse SelectTeam styles in ChannelsList view

* Display current team name in ChannelsList

* Disable android underline in textinputs
2016-10-18 13:32:07 -07: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
Mike Piccolo
f6e551c45b Example for using async/await (#11)
* Use babelrc

* Use async to unnest
2016-10-14 15:00:52 -07:00
Mike Piccolo
4130a08199 Use babelrc (#10) 2016-10-14 15:00:09 -07:00
Harrison Healey
574148c56d Attempt to fix how eslint is called from package.json (#7) 2016-10-12 14:41:00 -07:00
Harrison Healey
15a44ad453 Fixed actions unit tests and dispatching them 2016-10-11 17:34:15 -04:00
Harrison Healey
559ea98840 Added some more client APIs and refactored the client so it doesn't return a function 2016-10-11 15:50:08 -04:00
Harrison Healey
b86718f467 Started adding separate client tests from redux tests 2016-10-11 11:21:15 -04:00
Harrison Healey
589bc90605 Refactored client.js to have no knowledge of the redux stores 2016-10-11 09:52:40 -04:00
Harrison Healey
f0291172ac Added script to make React Native support absolute imports 2016-10-07 11:46:40 -04:00
Harrison Healey
723b32a6e2 Updated packages, switched to mocha for testing 2016-10-07 11:11:14 -04:00
Harrison Healey
0e57ec48f2 Fixed unit tests and cleaned up package.json imports 2016-10-06 10:09:38 -04:00
Harrison Healey
d8a510d354 Updated dependencies 2016-10-05 08:42:08 -04:00
Harrison Healey
6907e9a900 Initial commit 2016-10-04 14:10:44 -04:00