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

Integrate lbry redux and lbryinc #7240

Merged
merged 10 commits into from
Oct 16, 2021
Merged

Conversation

jessopb
Copy link
Member

@jessopb jessopb commented Oct 8, 2021

Moves all Lbry interface and all redux files into app redux.
Moves lbryinc module to 'extras'

export { doTransifexUpload } from 'util/transifex-upload';

// actions
export { doGenerateAuthToken } from './redux/actions/auth';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added relative path here: './redux/actions/auth'

@@ -0,0 +1,52 @@
import { Lbryio } from 'lbryinc';
import * as ACTIONS from 'constants/action_types';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unsure whether to leave lbryinc actions separate (import relatively) or move them all into the main actions_types file.

@@ -0,0 +1,79 @@
import Lbryio from 'lbryinc';
Copy link
Member Author

@jessopb jessopb Oct 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disabled the import for the homepage actions, selectors, reducer. Should probably delete it.

@@ -78,7 +78,7 @@ let baseConfig = {
homepage: 'util/homepage.js',
homepages: process.env.CUSTOM_HOMEPAGE === 'true' ? path.resolve(__dirname, 'custom/homepages/v2/index.js') : ('homepages/index.js'),
memes: process.env.CUSTOM_HOMEPAGE === 'true' ? path.resolve(__dirname, 'custom/homepages/meme/index.js') : path.resolve(__dirname, 'homepages/meme/index.js'),
lbryinc: 'lbryinc/dist/bundle.es.js',
lbryinc: 'extras/lbryinc',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved this alias to internal folder path.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fully merged lbry-redux stuff, but I didn't do the same for lbryinc. It may make sense to merge some of it but not others - but I got impatient and just wanted to hook it up.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to merge lbryinc because it had some dependencies on lbry-redux it was importing.

@@ -170,7 +170,7 @@ const webConfig = {
modules: [UI_ROOT, __dirname],

alias: {
lbryinc: 'lbryinc/dist/bundle.es.js',
lbryinc: '../extras/lbryinc',
electron: `${WEB_PLATFORM_ROOT}/stubs/electron.js`,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lbryinc alias to internal folder path.

import { claimsReducer, fileInfoReducer, walletReducer, publishReducer, collectionsReducer } from 'lbry-redux';
import { costInfoReducer, blacklistReducer, filteredReducer, homepageReducer, statsReducer, webReducer } from 'lbryinc';
import { costInfoReducer, blacklistReducer, filteredReducer, statsReducer, webReducer } from 'lbryinc';
import { claimsReducer } from 'redux/reducers/claims';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import reducers locally (these are named exports - I didn't rewrite them or default them).
lbryinc now imports from extras folder.

ui/lbry.js Outdated
@@ -0,0 +1,247 @@
// @flow
// import 'proxy-polyfill';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unsure whether I need this proxy-polyfill

@@ -156,8 +158,6 @@
"imagesloaded": "^4.1.4",
"json-loader": "^0.5.4",
"lbry-format": "https://github.com/lbryio/lbry-format.git",
"lbry-redux": "lbryio/lbry-redux#32b578707116d45f5b51b7ab523d200e75668676",
"lbryinc": "lbryio/lbryinc#0b4e41ef90d6347819dd3453f2f9398a5c1b4f36",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋

Copy link
Contributor

@infinite-persistence infinite-persistence left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick initial-first pass: looks good. Will test further.

static/app-strings.json Outdated Show resolved Hide resolved
ui/component/claimPreview/index.js Outdated Show resolved Hide resolved

if (!isProduction) {
if (claimId) {
console.error(__("'claimId' should no longer be used. Use 'streamClaimId' or 'channelClaimId' instead"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This error is happening constantly, with variations in livestreams.

If it's a direct copy, I'm guessing it's also happening in the past, just not displayed, so probably not a big deal. But curious what surfaced it.

image

Comment on lines +54 to +57
export const FETCH_BLACK_LISTED_CONTENT_STARTED = 'FETCH_BLACK_LISTED_CONTENT_STARTED';
export const FETCH_BLACK_LISTED_CONTENT_COMPLETED = 'FETCH_BLACK_LISTED_CONTENT_COMPLETED';
export const FETCH_BLACK_LISTED_CONTENT_FAILED = 'FETCH_BLACK_LISTED_CONTENT_FAILED';
export const BLACK_LISTED_CONTENT_SUBSCRIBE = 'BLACK_LISTED_CONTENT_SUBSCRIBE';
Copy link
Contributor

@infinite-persistence infinite-persistence Oct 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unsure whether to leave lbryinc actions separate (import relatively) or move them all into the main actions_types file.

Mixed feelings on two action_types.js too. There are duplicates on both sides (just like in the past). It's not clear to new comers which one takes precedence -- the main one, or extras?

@jessopb jessopb marked this pull request as ready for review October 12, 2021 16:03
bugfix

wip

flow

fix

cleaning

clean
@jessopb jessopb force-pushed the integrate-lbryReduxAndLbryinc branch from 54240a7 to d2f6c9d Compare October 12, 2021 19:23
@jessopb
Copy link
Member Author

jessopb commented Oct 12, 2021

image
QQ

@jessopb jessopb merged commit d405ff5 into master Oct 16, 2021
@jessopb jessopb deleted the integrate-lbryReduxAndLbryinc branch October 16, 2021 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants