GithubHelp home page GithubHelp logo

zulip / zulip-mobile Goto Github PK

View Code? Open in Web Editor NEW
1.3K 36.0 639.0 42.88 MB

Zulip mobile apps for Android and iOS.

Home Page: https://zulip.com/apps/

License: Apache License 2.0

Java 0.53% JavaScript 92.49% Objective-C 0.08% Shell 2.52% Kotlin 3.09% CSS 0.63% Ruby 0.15% Nix 0.06% Objective-C++ 0.27% Swift 0.13% C 0.03%
android ios react-native

zulip-mobile's Introduction

Zulip Mobile

CI Zulip chat PRs Welcome

Zulip Mobile is the official mobile Zulip client, supporting both iOS and Android.

Get the app

Release versions of the app are available here:

You can also help out by running beta versions of the app, and reporting bugs!

Maintenance mode

This codebase built on React Native is a legacy app, which is in maintenance mode as we focus on building a new Zulip mobile app with Flutter. This means:

  • This repository is the source code of the app we're still distributing and recommending for most users, until the new app is fully built and ready to replace it.

  • Feedback is still welcome. Some bugs and feature requests will be naturally resolved by the new app; others won't, and we'll transfer them over when the time comes as issues on the new app. We're happy to do the work of identifying which is which โ€” it's usually easy for us, given the time we've spent in both codebases.

  • The development work we do in this repo is kept to a minimum: we fix critical bugs, and we add support for a few of the new features being added to Zulip on the web and desktop, those where the leverage from mobile support is highest.

  • We aren't able to spend significant time investigating other bugs, or reviewing PRs from contributors. We're investing that time instead in getting the new Flutter app finished and into all our users' hands as soon as possible.

Contributing (old)

If you're interested in contributing to Zulip's mobile apps, see the new Flutter-based app.

Details below are from when this app was in active development. Some details may still be useful, but bear in mind that this app is in maintenance mode as described above.

Discussion

To get involved in Zulip Mobile development, please join us on the Zulip community Zulip server, in the #mobile stream. Come say hello, discuss areas to work on, and ask and answer questions.

Using the beta

One important way to contribute is to run beta versions of the app, and report bugs! To get the beta:

Bug reports are welcome either in the #mobile stream or on this GitHub repo.

Development

Zulip Mobile is written in JavaScript with React Native. To get started with the code, follow this doc:

Then see our Contribution Guidelines, and come say hello in the #mobile stream.

For more reading, take a look at our developer docs.

History

Zulip Mobile supersedes two legacy Zulip apps, zulip-ios and zulip-android (more history).

License

Copyright (c) 2016-2024 Kandra Labs, Inc., and contributors, and 2016 Dropbox, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

The software includes some works released by third parties under other free and open source licenses. Those works are redistributed under the license terms under which the works were received.

zulip-mobile's People

Contributors

agrawal-d avatar agzuniverse avatar akashdhiman avatar andersk avatar anh2111htd avatar borisyankov avatar chrisbobbe avatar codebu5ter avatar dependabot[bot] avatar ebouj avatar fingel avatar gautam-arora24 avatar gnprice avatar hashirsarwar avatar im-adithya avatar ishammahajan avatar jackrzhang avatar jainkuniya avatar kunall17 avatar maskedman99 avatar nashvail avatar neerajwahi avatar rk-for-zulip avatar roberthoenig avatar saketkumar avatar sam1301 avatar sumukhah avatar thisisnitish avatar titanous avatar wesleyac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zulip-mobile's Issues

Group messages more intelligently

Right now we group together consecutive messages with the same stream/topic or recipients but this can be improved in a few ways:

  • Don't group together consecutive messages into the same header if it's been a long time
  • Group together nearly-simultaneous consecutive messages by the same user (so that we don't display the username and time twice)

Submit updates to the server when the user reads messages

This is different from, but related to, #8; using the POST /messages/flags endpoint to send the list of messages not flagged as read that the user read on the device. Both are required for users who read messages on the app to not be unhappy with the level of synchronization between the webapp and the mobile app.

As part of implementing this, we will need to track the events coming in from the server that update which messages are shown as read.

Group recent messages together

When a user sends multiple messages in succession, we should group them together under one message header (like the web app)

Send presence updates (focusPings) at correct times

Tim thinks if we just do the following, we should be good:

  • Send when started or restored from suspended state
  • Send once per minute while the app is open.

Feedback on how this affect people 'I think activity in the mobile app doesn't mark me as "online" in the Zulip backend. I'm pretty sure that PMs received while I'm online (in the web app) don't trigger emails, yet I'm pretty sure I've received emails for PMs received while I had the mobile app open.'

Better structure and refactoring

Some issues that I will improve on:

  • Rename components from ZulipSomething to just Something
  • Rename components that are called SomethingView to SomethingScreen or SomethingScene, when they take up the whole screen
  • Rename user reducer into account reducer
  • Add more 'container' components, whose job is to wrap more purely presentational/behavioral components. They will get data from Redux and will request data from the api
  • Better organization of Flow types, some might go in one file
  • Clear distinction of Flow types - data from API vs internal data format

Persist login and auto login on next start

  • refactor store creation, add redux-persist
  • split userReducers into userReducers and authReducers
  • persist authReducers store data
  • all reducers use new auth instead of account
  • rewire other startup components with new state
  • delay app render until store is rehydrated
  • create another reducer (appReducer) with global app state like 'loggedIn'
  • more flat stores
  • on start if auth data exists, try to login
  • add logout functionality
  • if stored login is invalid, show login screen
  • remember dev login too

Decide on how deep to pass Immutable

We should discuss and document the outcome of the decision.

Several considerations

  • Keep immutables deep, for all components. Pros - simple. Cons - immutables are not as convenient to use for all cases. Good to have a lot of components depend on simple standard types.
  • toJS() them everywhere in mapStateToProps - Pros - simple. Cons - is a bad idea. Mentioning it intentionally. Kills performance because breaks shouldComponentUpdate - always is true because new objects. Should not use.
  • Strategically use toJS() at some depth. Likely the best solution but needs thinking through.

Global Error Management

Handle global errors, that might occur at any time.
This is different than one-time handling of same error, like incorrect password on login screen.

  • Refactor api functions
  • Connection lost - show 'offline' message
  • Password incorrect. Reason: User changed password in other app or similar. Action: Go back to login screen
  • Maybe use NetInfo for additional offline detection.

https://facebook.github.io/react-native/docs/netinfo.html

Select messages by clicking on them

Related to #4. Clicking on a message in a stream should open the compose view with the stream and thread defaulted to those of the selected message.

Multi-account support

  • Refactor authReducer into accountsReducer
  • Account list screen for initial selection
  • Persist all successful logins
  • Account list for switching between
  • Navigation flow on login, can go back from login
  • A selector to pick the active account
  • When logged in, account becomes the default one, to be reused on next run
  • Can remove an account from the list
  • Custom Account Picker Item with Remove button
  • Tests
  • Account list, login on click
  • Remember partial accounts
  • Account switcher when inside the app

Use a clear user agent for requests coming from the React Native app

This is important to make it easy to debug which requests are coming from the app server-side.

Given the style of how Zulip does User-Agent strings for API integrations / the other apps, I think we probably want something in the format of ZulipReactNative/0.1.0 (iOS: 7.1.2). where 0.1.0 is the version of the app itself and 7.1.2 is the iOS version.

Add search feature

UI:

  • Magnifying glass to the right of the navigation title
  • Clicking it reveals a search text field underneath the navigation bar

Indicators in scroll view

Add indicators in the scroll view for:

  • Up-to-date (caught up with latest messages)
  • No older messages

Move stream list to modal window

The stream list is currently contained in a sliding drawer (which slides in from the left when the user swipes or clicks a button in the navigation bar).

We could move this feature to a modal window that expands when the user clicks the stream title (or a little arrow next to it). Doing so leaves the left navigation button and left swipe available to be used for a 'back' action.

Polish start & login experience

  • After login, when navigating to 'main' reset previous routes
  • If only one auth backend, skip backend pickup screen
  • Splash screen
  • If no protocol is entered, prepend 'https://'
  • No 'flashing' of routes

Add forced update feature

This would prevent a user from using the app if the version is too old

We decided the implementation of this should be as follows:

  • We check for an error returned by events_register with some specific error code that means "You need to upgrade"
  • Additionally, we add a new small endpoint on zulipchat.com (or configurable app endpoint) that is passed the current zulip-mobile app version and returns whether it needs to upgrade or not. Tim can quickly write the backend endpoint as soon as we're ready to work on this.

Network requests have no timeout

There's currently no timeout for network requests. For instance, if a user attempts to login to a non-responding server, the UI will lock up.

Fixing the issue will likely involve wrapping the fetch promise with a timeout in ApiClient.js

Render HTML in messages

The native iOS app uses NSAttributedString which provides a fromHTML option. We don't have that luxury in React Native so we'll either have to write our own parser for a subset of HTML, use an appropriate third-party module, or fallback on a native component for rendering messages.

Add GCM and APNS support

The Zulip server sends push notifications for iOS devices; we should add support for displaying this in zulip-mobile.

Add ability to compose new messages

This is a large task and will require additions to the UI (for a compose bar and text fields) and API logic to send new messages to the server.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.