Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.5.0 #19

Merged
merged 100 commits into from
Feb 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
13c01f0
chore: upgrade react-native to 0.51.0, react to 16.0.0
just4fun Dec 23, 2017
54a7b8e
fix: fix the errors with react-native 0.51.0
just4fun Dec 23, 2017
ab16256
Merge branch 'master' into rn-0.51.0
just4fun Dec 26, 2017
0064edc
feat: add keyboard accessory area to support something like pick emoji
just4fun Dec 26, 2017
de5e5b5
feat: switch between keyboard panel and meme panel
just4fun Dec 28, 2017
c1bb977
feat(WIP): display meme in panel
just4fun Jan 1, 2018
b91c39a
refactor: move reply button to screen bottom of topic detail
just4fun Jan 2, 2018
7691f84
chore: update packages to adjust react-native 0.51.0
just4fun Jan 3, 2018
d88f32c
feat: copy content to clipboard; order topic comments
just4fun Jan 4, 2018
57ab7da
refactor (WIP): replace deprecated Navigator with React Navigation
just4fun Jan 5, 2018
97cf278
feat: add all kinds of meme
just4fun Jan 6, 2018
ca1044e
fix: makes emoji panel beauty
just4fun Jan 7, 2018
33b05ab
fix: insert emoji at where cursor located; hide emoji panel while
just4fun Jan 7, 2018
6b51334
feat: add emoji panel to reply modal
just4fun Jan 7, 2018
37639c5
fix: figure out the root cause which block whole app to launch
just4fun Jan 7, 2018
7df8a49
refactor (WIP): replace deprecated Navigator with React Navigation
just4fun Jan 10, 2018
072a0e4
refactor (WIP): replace router with react navigation for most of pages
just4fun Jan 11, 2018
52e9765
refactor (WIP): fix more places for router migration
just4fun Jan 12, 2018
6c2bda6
feat: use the right way to display each screen for drawer items
just4fun Jan 13, 2018
3178037
refactor: workaround to use modal mode with card mode together
just4fun Jan 14, 2018
ac22971
WIP
just4fun Jan 19, 2018
41105bb
fix: The Image component cannot contain children above 0.50
just4fun Jan 20, 2018
7d32104
refactor: adjust iPhone X
just4fun Jan 21, 2018
f6aa121
Merge branch 'meme' into v1.5.0
just4fun Jan 21, 2018
3a4b726
Merge branch 'rn-0.51.0' into v1.5.0
just4fun Jan 21, 2018
969785c
refactor: fix more breaking places
just4fun Jan 21, 2018
56d77b3
refactor: fix more breaking places
just4fun Jan 24, 2018
85cb95a
refactor: make alert works
just4fun Jan 25, 2018
20281d6
refactor: fix more places
just4fun Jan 26, 2018
3e906e8
refactor: publish/reply topic in right way
just4fun Jan 29, 2018
6a3541d
refactor: favor/vote topic in right way
just4fun Jan 30, 2018
93fb18e
fix: `checked` is initial checked value in new version of
just4fun Jan 30, 2018
ecbd4b7
refactor: remove useless code
just4fun Jan 30, 2018
6ebd983
fix: make touchable area same with avatar
just4fun Jan 30, 2018
d7af4a2
refactor: remove more useless code
just4fun Feb 1, 2018
a8e05a7
fix: add quick search alert
just4fun Feb 1, 2018
b64a27e
fix: remove extra header
just4fun Feb 2, 2018
d59f6d6
refactor: replace deprecated ListView with FlatList
just4fun Feb 2, 2018
52493ef
refactor: disable gesture to open drawer
just4fun Feb 3, 2018
f6258e9
refactor: remove redundant code for web view component
just4fun Feb 3, 2018
725ecd6
refactor: reset route to home page
just4fun Feb 3, 2018
ca7556d
fix: add missing copy content for comment; exclude emoji for copy
just4fun Feb 3, 2018
1226a3a
fix: use default header for home page
just4fun Feb 3, 2018
04b8774
fix: userId from topic content link will be string
just4fun Feb 3, 2018
2250072
feat: show login modal if user click anywhere without credentials
just4fun Feb 3, 2018
ddcfd84
feat: add list empty component
just4fun Feb 5, 2018
ee5b0bd
refactor: fix profile height on non-iPhone X devices
just4fun Feb 5, 2018
1dc566f
fix: expand touch area for menu button after use react navigation header
just4fun Feb 5, 2018
2a01ed7
refactor: make publish works; some nits
just4fun Feb 5, 2018
17e4376
chore: remove useless images; replace old logo in about page
just4fun Feb 5, 2018
b47a450
fix: missing userId to indicate login user
just4fun Feb 5, 2018
799e031
feat: add confirm dialog when publish/reply topic
just4fun Feb 9, 2018
35f485e
feat: add FAQ page
just4fun Feb 9, 2018
618e60e
chore: bump version to v1.5.0
just4fun Feb 9, 2018
bf261cc
refactor: update copy right with correct year
just4fun Feb 11, 2018
6fdd1d2
refactor: move poll frequency to config; reduce pm poll time to 20s
just4fun Feb 11, 2018
250c001
feat: update alert count immediately instead of clearing it via poll
just4fun Feb 11, 2018
94846d7
fix: fetch alters immediately once alert toggle enabled
just4fun Feb 11, 2018
c0d5989
feat: click reward admin avatar to their individual pages
just4fun Feb 12, 2018
f37fb3f
fix: click topic author avatar makes app crash
just4fun Feb 12, 2018
9cdff9b
refactor:
just4fun Feb 12, 2018
646077c
chore: bump react-navigation version
just4fun Feb 13, 2018
3b527b3
fix: fetch alert immediately may crash app
just4fun Feb 13, 2018
50d3109
fix: topic title will be treated as screen header title
just4fun Feb 13, 2018
fd46ce6
fix: avoid English word `Back`
just4fun Feb 13, 2018
c610830
fix: avoid to pop up error dialog twice
just4fun Feb 13, 2018
7ca5706
fix: fix 50d310 in right way
just4fun Feb 13, 2018
b54fbef
feat: add settings for publish dialog
just4fun Feb 14, 2018
21d005a
fix: new RegExp(/xyz/, 'i') doesn't work below iOS 10
just4fun Feb 14, 2018
2f311fb
fix: display emoji perfectly
just4fun Feb 14, 2018
b3711e5
chore: extend publish time to simulate slow network
just4fun Feb 14, 2018
a360234
fix: hide emoji keyboard while publishing/replying
just4fun Feb 14, 2018
cc3cf0c
refactor: simple way to hide keyboard
just4fun Feb 14, 2018
080f738
refactor: KeyboardAwareScrollView already registered keyboard events
just4fun Feb 15, 2018
455ba16
fix: use ScrollView for About page and Settings page
just4fun Feb 15, 2018
e334697
fix: jump to iOS settings if no picture/camera access
just4fun Feb 15, 2018
7e42cf5
fix: workaround to make both keyboards works
just4fun Feb 15, 2018
79631c2
fix: expand headerRight button area; fix emoji accessory width
just4fun Feb 15, 2018
c1eed32
fix: show anonymous topics
just4fun Feb 15, 2018
f227938
fix: anonymous topic author will be exposed in individual replied list
just4fun Feb 15, 2018
0cd5af4
feat: edit comment
just4fun Feb 15, 2018
c8a5fd9
feat: edit topic
just4fun Feb 15, 2018
fceed41
feat: navigate from individual page to informatin page
just4fun Feb 16, 2018
3ab766e
feat: back to home page
just4fun Feb 16, 2018
f687880
feat: add loading indicator for default image
just4fun Feb 16, 2018
4da0eaf
refactor: rename `meme` to `emoji`
just4fun Feb 18, 2018
883e8a6
refactor: make emoji keyboard works
just4fun Feb 18, 2018
95d78fa
style: fix eslint warnings
just4fun Feb 18, 2018
314560c
docs: update Screenshot and finished functionalities
just4fun Feb 18, 2018
cad055e
fix: click more while fetching topic will make app crash
just4fun Feb 21, 2018
0055b54
refactor: update comment area style
just4fun Feb 22, 2018
37d9a0d
fix: remove extra space of iPhone X for keyboard accessory
just4fun Feb 22, 2018
6e4a51a
fix: fetch notifications immediately; mark notify item as read in right
just4fun Feb 22, 2018
6b44229
docs: add officially recommended clients list page
just4fun Feb 22, 2018
939f305
docs: add one more known issue
just4fun Feb 22, 2018
2594c95
feat: display default emojis in content
just4fun Feb 22, 2018
ab11c5f
fix: workaround to bypass keyboard bug on iOS 11.2
just4fun Feb 22, 2018
695851c
fix: exclude custom emoji as copy content but include default emoji
just4fun Feb 22, 2018
6e451dd
docs: add FAQ link
just4fun Feb 22, 2018
d242dd9
fix: sequential default emojis should be displayed
just4fun Feb 23, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"presets": ["react-native"]
}
"presets": ["react-native"]
}
18 changes: 10 additions & 8 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,37 @@
; For RN Apps installed via npm, "Libraries" folder is inside
; "node_modules/react-native" but in the source repo it is in the root
.*/Libraries/react-native/React.js
.*/Libraries/react-native/ReactNative.js

; Ignore polyfills
.*/Libraries/polyfills/.*

[include]

[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow
flow/
node_modules/react-native/flow/

[options]
emoji=true

module.system=haste

experimental.strict_type_args=true

munge_underscores=true

module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_type=$FixMe

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-8]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-8]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-7]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-7]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

unsafe.enable_getters_and_setters=true

[version]
^0.38.0
^0.57.0
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ buck-out/
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
# https://docs.fastlane.tools/best-practices/source-control/

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots

# Vim
#
Expand Down
27 changes: 17 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
[<img width="200" alt="new_logo" src="https://user-images.githubusercontent.com/7512625/34460783-aaf95076-ee53-11e7-8699-3e94b6a0c270.png">](https://user-images.githubusercontent.com/7512625/34460783-aaf95076-ee53-11e7-8699-3e94b6a0c270.png)

[![React Native](https://img.shields.io/badge/react--native-v0.42.2-05A5D1.svg)](https://facebook.github.io/react-native)
[![React Native](https://img.shields.io/badge/react--native-v0.51.0-05A5D1.svg)](https://facebook.github.io/react-native)
[![GitHub issues](https://img.shields.io/github/issues/just4fun/stuhome.svg)](https://github.com/just4fun/stuhome/issues)
[![MIT](https://img.shields.io/dub/l/vibe-d.svg)](http://opensource.org/licenses/MIT)

An iOS client for http://bbs.uestc.edu.cn/ written in [React Native](https://facebook.github.io/react-native/) with [Redux](http://redux.js.org/). APIs are provided by [UESTC-BBS](https://github.com/UESTC-BBS/API-Docs/wiki/Mobcent-API).
An officially recommended iOS client for http://bbs.uestc.edu.cn/ written in [React Native](https://facebook.github.io/react-native/) with [Redux](http://redux.js.org/). APIs are provided by [UESTC-BBS/API-Docs](https://github.com/UESTC-BBS/API-Docs/wiki/Mobcent-API) and [appbyme/mobcent-discuz](https://github.com/appbyme/mobcent-discuz).

For all officially recommended clients, please visit http://bbs.uestc.edu.cn/forum.php?mod=viewthread&tid=1554255.

## Old logo (from v1.0.0 to v1.3.0)

![app_icon](https://cloud.githubusercontent.com/assets/7512625/18613513/348f7322-7daf-11e6-902d-94776bb55670.jpg)

## Status (v1.4.0)
## Status (v1.5.0)

[<img width="250" alt="download_on_the_app_store" src="https://user-images.githubusercontent.com/7512625/27969868-353f554c-637f-11e7-869d-3963933461ca.png">](https://itunes.apple.com/cn/app/qing-shui-he-pan-stuhome/id1190564355)

![](https://cloud.githubusercontent.com/assets/7512625/12371330/88981098-bc6a-11e5-8511-6e02c5233006.gif)

## Screenshot

![](https://user-images.githubusercontent.com/7512625/29569829-4596c76e-8787-11e7-98d8-9bf904a052f0.gif)
![stuhome](https://user-images.githubusercontent.com/7512625/36350789-f5a43838-14d8-11e8-8a90-801e69f665c1.gif)

## Existing functionalities

- [x] Authentication
- [x] Sign up (Webview)
- [x] Sign up (WebView)
- [x] Sign in
- [x] Sign out
- [x] Forum
Expand All @@ -34,14 +36,14 @@ An iOS client for http://bbs.uestc.edu.cn/ written in [React Native](https://fac
- [x] View latest topics
- [x] View hot topics
- [x] View topic detail and comments
- [ ] View specific comments (only from author, descending order, etc)
- [x] View specific comments (only from author, descending order, etc)
- [x] Publish topic
- [ ] Edit published topic
- [x] Edit published topic (WebView)
- [x] Reply topic
- [x] Reply comment
- [x] Favor topic
- [x] Upload images
- [ ] Meme
- [x] Emoji
- [ ] Report objectionable content
- [ ] Vote
- [ ] Create vote
Expand Down Expand Up @@ -86,12 +88,17 @@ npm run eslint
- ~~Submit to [App Store](https://itunes.apple.com/cn/app/qing-shui-he-pan-stuhome/id1190564355)~~
- ~~Replace [redux-thunk](https://github.com/gaearon/redux-thunk) with [redux-saga](https://github.com/redux-saga/redux-saga)~~ ([#7](https://github.com/just4fun/stuhome/pull/7))
- ~~Unit Testing Infrastructure~~ ([#8](https://github.com/just4fun/stuhome/pull/8))
- Replace deprecated Navigator with [React Navigation](https://github.com/react-navigation/react-navigation)
- ~~Replace deprecated Navigator with [React Navigation](https://github.com/react-navigation/react-navigation)~~ ([#19](https://github.com/just4fun/stuhome/pull/19))

## Known issues

- ~~User avatar is not displayed sometimes: [RN/issue](https://github.com/facebook/react-native/issues/5616)~~ (Fixed by this [PR](https://github.com/facebook/react-native/pull/7262) for React Native, and the patch is released in `0.26.0`)
- ~~Switching between pages is not very smooth sometimes~~
- ~~Switching between pages is not very smooth sometimes~~ (Fixed by replacing deprecated Navigator with [React Navigation](https://github.com/react-navigation/react-navigation))
- Emoji could not be displayed in text input: [RN/issue](https://github.com/facebook/react-native/issues/17468)

## FAQ

https://github.com/just4fun/stuhome/wiki/FAQ

## License

Expand Down
53 changes: 26 additions & 27 deletions android/app/BUCK
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import re

# To learn about Buck see [Docs](https://buckbuild.com/).
# To run your application with Buck:
# - install Buck
Expand All @@ -11,56 +9,57 @@ import re
#

lib_deps = []

for jarfile in glob(['libs/*.jar']):
name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile)
name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]
lib_deps.append(':' + name)
prebuilt_jar(
name = name,
binary_jar = jarfile,
)

for aarfile in glob(['libs/*.aar']):
name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile)
name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')]
lib_deps.append(':' + name)
android_prebuilt_aar(
name = name,
aar = aarfile,
)

android_library(
name = 'all-libs',
exported_deps = lib_deps
name = "all-libs",
exported_deps = lib_deps,
)

android_library(
name = 'app-code',
srcs = glob([
'src/main/java/**/*.java',
]),
deps = [
':all-libs',
':build_config',
':res',
],
name = "app-code",
srcs = glob([
"src/main/java/**/*.java",
]),
deps = [
":all-libs",
":build_config",
":res",
],
)

android_build_config(
name = 'build_config',
package = 'com.stuhome',
name = "build_config",
package = "com.stuhome",
)

android_resource(
name = 'res',
res = 'src/main/res',
package = 'com.stuhome',
name = "res",
package = "com.stuhome",
res = "src/main/res",
)

android_binary(
name = 'app',
package_type = 'debug',
manifest = 'src/main/AndroidManifest.xml',
keystore = '//android/keystores:debug',
deps = [
':app-code',
],
name = "app",
keystore = "//android/keystores:debug",
manifest = "src/main/AndroidManifest.xml",
package_type = "debug",
deps = [
":app-code",
],
)
14 changes: 12 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ import com.android.build.OutputFile
* // bundleInPaidRelease: true,
* // bundleInBeta: true,
*
* // whether to disable dev mode in custom build variants (by default only disabled in release)
* // for example: to disable dev mode in the staging build type (if configured)
* devDisabledInStaging: true,
* // The configuration property can be in the following formats
* // 'devDisabledIn${productFlavor}${buildType}'
* // 'devDisabledIn${buildType}'
*
* // the root of your project, i.e. where "package.json" lives
* root: "../../",
*
Expand All @@ -58,13 +65,17 @@ import com.android.build.OutputFile
* inputExcludes: ["android/**", "ios/**"],
*
* // override which node gets called and with what additional arguments
* nodeExecutableAndArgs: ["node"]
* nodeExecutableAndArgs: ["node"],
*
* // supply additional arguments to the packager
* extraPackagerArgs: []
* ]
*/

project.ext.react = [
entryFile: "index.js"
]

apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"

Expand Down Expand Up @@ -127,7 +138,6 @@ android {
}

dependencies {
compile project(':react-native-fetch-blob')
compile project(':react-native-image-crop-picker')
compile project(':react-native-vector-icons')
compile fileTree(dir: "libs", include: ["*.jar"])
Expand Down
4 changes: 4 additions & 0 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@

-dontwarn com.facebook.react.**

# TextLayoutBuilder uses a non-public Android constructor within StaticLayout.
# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details.
-dontwarn android.text.StaticLayout

# okhttp

-keepattributes Signature
Expand Down
Binary file added android/app/src/main/assets/fonts/Feather.ttf
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/Octicons.ttf
Binary file not shown.
7 changes: 5 additions & 2 deletions android/app/src/main/java/com/stuhome/MainApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import android.app.Application;

import com.facebook.react.ReactApplication;
import com.RNFetchBlob.RNFetchBlobPackage;
import com.reactnative.ivpusic.imagepicker.PickerPackage;
import com.oblador.vectoricons.VectorIconsPackage;
import com.facebook.react.ReactNativeHost;
Expand Down Expand Up @@ -32,11 +31,15 @@ public boolean getUseDeveloperSupport() {
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new RNFetchBlobPackage(),
new PickerPackage(),
new VectorIconsPackage()
);
}

@Override
protected String getJSMainModuleName() {
return "index";
}
};

@Override
Expand Down
12 changes: 6 additions & 6 deletions android/keystores/BUCK
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
keystore(
name = 'debug',
store = 'debug.keystore',
properties = 'debug.keystore.properties',
visibility = [
'PUBLIC',
],
name = "debug",
properties = "debug.keystore.properties",
store = "debug.keystore",
visibility = [
"PUBLIC",
],
)
2 changes: 0 additions & 2 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
rootProject.name = 'stuhome'
include ':react-native-fetch-blob'
project(':react-native-fetch-blob').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fetch-blob/android')
include ':react-native-image-crop-picker'
project(':react-native-image-crop-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-crop-picker/android')
include ':react-native-vector-icons'
Expand Down
4 changes: 4 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "stuhome",
"displayName": "stuhome"
}
File renamed without changes.
Loading