Skip to content

Commit

Permalink
Merge branch 'RocketChat:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
RochaCarla authored Nov 17, 2022
2 parents 4bbf2c0 + 44f062f commit bbf3cd0
Show file tree
Hide file tree
Showing 558 changed files with 20,933 additions and 22,885 deletions.
2 changes: 2 additions & 0 deletions .bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BUNDLE_PATH: "vendor/bundle"
BUNDLE_FORCE_RUBY_PLATFORM: 1
12 changes: 5 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,15 @@ commands:
steps:
- restore_cache:
name: Restore pods
# TODO: CircleCI isn't caching Podfile.lock correctly, because checksum changes after install
# key: pods-v1-{{ checksum "ios/Podfile.lock" }}
key: pods-v1-{{ checksum "ios/Podfile" }}
key: pods-v1-{{ checksum "ios/Podfile.lock" }}
- run:
name: Install pods libs
command: |
bundle exec pod install
bundle exec pod install --deployment
working_directory: ios
- save_cache:
name: Save pods specs and pods cache
# key: pods-v1-{{ checksum "ios/Podfile.lock" }}
key: pods-v1-{{ checksum "ios/Podfile" }}
key: pods-v1-{{ checksum "ios/Podfile.lock" }}
paths:
- ~/.pods
- ios/Pods
Expand All @@ -114,7 +111,8 @@ commands:
# echo -e "android.enableAapt2=false" >> ./gradle.properties
echo -e "android.useAndroidX=true" >> ./gradle.properties
echo -e "android.enableJetifier=true" >> ./gradle.properties
echo -e "FLIPPER_VERSION=0.51.0" >> ./gradle.properties
echo -e "newArchEnabled=false" >> ./gradle.properties
echo -e "FLIPPER_VERSION=0.125.0" >> ./gradle.properties
echo -e "VERSIONCODE=$CIRCLE_BUILD_NUM" >> ./gradle.properties
if [[ $CIRCLE_JOB == "android-build-official" ]]; then
Expand Down
33 changes: 17 additions & 16 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,22 +156,6 @@ module.exports = {
__DEV__: true
},
overrides: [
{
files: ['e2e/**'],
globals: {
by: true,
detox: true,
device: true,
element: true,
expect: true,
waitFor: true
},
rules: {
'import/no-extraneous-dependencies': 0,
'no-await-in-loop': 0,
'no-restricted-syntax': 0
}
},
{
files: ['**/*.ts', '**/*.tsx'],
extends: [
Expand Down Expand Up @@ -253,6 +237,23 @@ module.exports = {
}
}
}
},
{
files: ['e2e/**'],
globals: {
by: true,
detox: true,
device: true,
element: true,
waitFor: true
},
rules: {
'import/no-extraneous-dependencies': 0,
'no-await-in-loop': 0,
'no-restricted-syntax': 0,
// TODO: remove this rule when update Detox to 20 and test if the namespace Detox is available
'no-undef': 1
}
}
]
};
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
open-pull-requests-limit: 25
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ DerivedData
project.xcworkspace
*.mobileprovision
ios/Pods/
/vendor/bundle/

# Android/IntelliJ
#
Expand Down Expand Up @@ -65,5 +66,6 @@ artifacts
e2e/docker/rc_test_env/docker-compose.yml
e2e/docker/data/db
e2e/e2e_account.js
e2e/e2e_account.ts

*.p8
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,8 @@ SECURITY.md
npm-debug.log
yarn-error.log

.storybook/

app/i18n/locales/
app/containers/CustomIcon/mappedIcons.js
app/containers/CustomIcon/selection.json
4 changes: 2 additions & 2 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module.exports = {
bracketSpacing: true,
jsxBracketSameLine: true,
singleQuote: true,
jsxSingleQuote: true,
trailingComma: 'none',
printWidth: 130,
useTabs: true,
arrowParens: 'avoid'
arrowParens: 'avoid',
bracketSameLine: true
};
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.7.4
19 changes: 19 additions & 0 deletions .storybook/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { getStorybookUI } from '@storybook/react-native';
import './storybook.requires';

import RNBootSplash from 'react-native-bootsplash';

import { selectServerRequest } from '../app/actions/server';
import { mockedStore as store } from '../app/reducers/mockedStore';
import database from '../app/lib/database';
import { setUser } from '../app/actions/login';

RNBootSplash.hide();

const baseUrl = 'https://open.rocket.chat';
store.dispatch(selectServerRequest(baseUrl));
store.dispatch(setUser({ id: 'abc', username: 'rocket.cat', name: 'Rocket Cat' }));
database.setActiveDB(baseUrl);

const StorybookUIRoot = getStorybookUI({});
export default StorybookUIRoot;
4 changes: 4 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
stories: ['../app/**/*.stories.?(ts|tsx|js|jsx)'],
addons: []
};
40 changes: 40 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import React from 'react';
import { Provider } from 'react-redux';

import { themes } from '../app/lib/constants';
import MessageContext from '../app/containers/message/Context';
import { selectServerRequest } from '../app/actions/server';
import { mockedStore as store } from '../app/reducers/mockedStore';
import { setUser } from '../app/actions/login';

const baseUrl = 'https://open.rocket.chat';
store.dispatch(selectServerRequest(baseUrl));
store.dispatch(setUser({ id: 'abc', username: 'rocket.cat', name: 'Rocket Cat' }));

export const decorators = [
Story => (
<Provider store={store}>
<MessageContext.Provider
value={{
user: {
id: 'y8bd77ptZswPj3EW8',
username: 'diego.mello',
token: 'abc'
},
baseUrl,
onPress: () => {},
onLongPress: () => {},
reactionInit: () => {},
onErrorPress: () => {},
replyBroadcast: () => {},
onReactionPress: () => {},
onDiscussionPress: () => {},
onReactionLongPress: () => {},
threadBadgeColor: themes.light.tunreadColor
}}
>
<Story />
</MessageContext.Provider>
</Provider>
)
];
50 changes: 50 additions & 0 deletions .storybook/storybook.requires.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/* do not change this file, it is auto generated by storybook. */

import {
configure,
addDecorator,
addParameters,
addArgsEnhancer,
} from "@storybook/react-native";

import { decorators, parameters } from "./preview";

if (decorators) {
decorators.forEach((decorator) => addDecorator(decorator));
}

if (parameters) {
addParameters(parameters);
}

const getStories = () => {
return [
require("../app/containers/Avatar/Avatar.stories.tsx"),
require("../app/containers/BackgroundContainer/index.stories.tsx"),
require("../app/containers/Button/Button.stories.tsx"),
require("../app/containers/Chip/Chip.stories.tsx"),
require("../app/containers/HeaderButton/HeaderButtons.stories.tsx"),
require("../app/containers/List/List.stories.tsx"),
require("../app/containers/LoginServices/LoginServices.stories.tsx"),
require("../app/containers/markdown/Markdown.stories.tsx"),
require("../app/containers/markdown/new/NewMarkdown.stories.tsx"),
require("../app/containers/message/Components/CollapsibleQuote/CollapsibleQuote.stories.tsx"),
require("../app/containers/message/Message.stories.tsx"),
require("../app/containers/ReactionsList/ReactionsList.stories.tsx"),
require("../app/containers/RoomHeader/RoomHeader.stories.tsx"),
require("../app/containers/RoomItem/RoomItem.stories.tsx"),
require("../app/containers/SearchBox/SearchBox.stories.tsx"),
require("../app/containers/ServerItem/ServerItem.stories.tsx"),
require("../app/containers/TextInput/TextInput.stories.tsx"),
require("../app/containers/UIKit/UiKitMessage.stories.tsx"),
require("../app/containers/UIKit/UiKitModal.stories.tsx"),
require("../app/containers/UnreadBadge/UnreadBadge.stories.tsx"),
require("../app/views/CannedResponsesListView/CannedResponseItem.stories.tsx"),
require("../app/views/CreateChannelView/RoomSettings/SwitchItem.stories.tsx"),
require("../app/views/DiscussionsView/Item.stories.tsx"),
require("../app/views/RoomView/LoadMore/LoadMore.stories.tsx"),
require("../app/views/ThreadMessagesView/Item.stories.tsx"),
];
};

configure(getStories, module, false);
File renamed without changes.
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby '2.7.4'
gem 'cocoapods', '~> 1.11', '>= 1.11.2'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![CodeFactor](https://www.codefactor.io/repository/github/rocketchat/rocket.chat.reactnative/badge)](https://www.codefactor.io/repository/github/rocketchat/rocket.chat.reactnative)

- **Supported server versions:** 0.70.0+
- **Supported iOS versions**: 11+
- **Supported iOS versions**: 12+
- **Supported Android versions**: 6.0+

## Download
Expand Down
14 changes: 0 additions & 14 deletions __mocks__/expo-av.js

This file was deleted.

4 changes: 0 additions & 4 deletions __mocks__/expo-keep-awake.js

This file was deleted.

3 changes: 0 additions & 3 deletions __mocks__/expo-web-browser.js

This file was deleted.

17 changes: 17 additions & 0 deletions __mocks__/react-native-mmkv-storage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export class MMKVLoader {
constructor() {
console.log('MMKVLoader constructor mock');
}

setProcessingMode = jest.fn().mockImplementation(() => ({
withEncryption: jest.fn().mockImplementation(() => ({
initialize: jest.fn().mockImplementation(() => {})
}))
}));
}

export const ProcessingModes = {
MULTI_PROCESS: ''
};

export const create = jest.fn();
4 changes: 0 additions & 4 deletions __mocks__/rn-user-defaults.js

This file was deleted.

Loading

0 comments on commit bbf3cd0

Please sign in to comment.