Common components refactor #1

Merged
akinwale merged 42 commits from common-components-refactor into master 2018-04-05 04:57:30 +02:00
akinwale commented 2018-01-17 15:48:52 +01:00 (Migrated from github.com)
No description provided.
kauffj (Migrated from github.com) requested changes 2018-02-02 15:55:14 +01:00
@ -0,0 +1,30 @@
{
kauffj (Migrated from github.com) commented 2018-02-02 15:38:47 +01:00

It's a dream to have linting and prettier configuration files shared across JS repos, right?

It's a dream to have linting and prettier configuration files shared across JS repos, right?
kauffj (Migrated from github.com) commented 2018-02-02 15:38:56 +01:00

(By dream I mean unrealistic)

(By dream I mean unrealistic)
@ -1,5 +1,14 @@
module.exports =
/******/ (function(modules) { // webpackBootstrap
(function webpackUniversalModuleDefinition(root, factory) {
kauffj (Migrated from github.com) commented 2018-02-02 15:39:19 +01:00

This shouldn't be checked in.

This shouldn't be checked in.
@ -17,6 +17,7 @@
"main": "build/index.js",
"scripts": {
"build": "webpack",
"precommit": "lint-staged",
kauffj (Migrated from github.com) commented 2018-02-02 15:40:36 +01:00

Please remove any unused depdencies.

Please remove any unused depdencies.
kauffj (Migrated from github.com) commented 2018-02-02 15:43:11 +01:00

What's the purpose of this file?

What's the purpose of this file?
@ -8,116 +9,88 @@ const Lbry = {
pendingPublishTimeout: 20 * 60 * 1000,
};
kauffj (Migrated from github.com) commented 2018-02-02 15:45:02 +01:00

jsonrpc logic can be moved into this file

jsonrpc logic can be moved into this file
kauffj (Migrated from github.com) commented 2018-02-02 15:45:32 +01:00

Also, all of the properties on Lbry can be killed and Lbry can just be the API proxy.

Also, all of the properties on `Lbry` can be killed and `Lbry` can just be the API proxy.
@ -4,2 +3,3 @@
const LbryApi = {
const Lbryapi = {
enabled: true,
exchangePromise: null,
kauffj (Migrated from github.com) commented 2018-02-02 15:48:12 +01:00

I think we should consider naming this something else. If a new user is using this repo to build something, it's confusing to have two objects, Lbry, and LbryApi, and then first one is the LBRY API!

Maybe call this LbryIncApi or LbryIoApi? Not in love with either.

I think we should consider naming this something else. If a new user is using this repo to build something, it's confusing to have two objects, `Lbry`, and `LbryApi`, and then first one is the LBRY API! Maybe call this `LbryIncApi` or `LbryIoApi`? Not in love with either.
kauffj (Migrated from github.com) commented 2018-02-02 15:51:05 +01:00

All of these actions should probably be outside of lbry-redux, eh?

All of these actions should probably be outside of `lbry-redux`, eh?
kauffj (Migrated from github.com) commented 2018-02-02 15:53:15 +01:00

All of these will need to be removed from other actions.

All of these will need to be removed from other actions.
kauffj (Migrated from github.com) commented 2018-02-02 15:54:00 +01:00

Should these actions be in lbry-redux? I'm inclined to say no.

Should these actions be in `lbry-redux`? I'm inclined to say no.
akinwale (Migrated from github.com) reviewed 2018-02-05 08:36:29 +01:00
@ -1,5 +1,14 @@
module.exports =
/******/ (function(modules) { // webpackBootstrap
(function webpackUniversalModuleDefinition(root, factory) {
akinwale (Migrated from github.com) commented 2018-02-05 08:36:29 +01:00

This was generated by webpack. I'll see if I can remove it.

This was generated by webpack. I'll see if I can remove it.
akinwale (Migrated from github.com) reviewed 2018-02-05 08:40:41 +01:00
akinwale (Migrated from github.com) commented 2018-02-05 08:40:41 +01:00

The exports exist to expose names that need to be used from the source file, so that they can be included in the webpack build, which makes them accessible when the lbry-redux package is being used elsewhere. This is similar to how other React packages work. For example, https://github.com/reactjs/react-redux/blob/master/src/index.js

build/index.js is the webpack output.

The exports exist to expose names that need to be used from the source file, so that they can be included in the webpack build, which makes them accessible when the lbry-redux package is being used elsewhere. This is similar to how other React packages work. For example, https://github.com/reactjs/react-redux/blob/master/src/index.js build/index.js is the webpack output.
akinwale (Migrated from github.com) reviewed 2018-02-05 08:42:39 +01:00
@ -4,2 +3,3 @@
const LbryApi = {
const Lbryapi = {
enabled: true,
exchangePromise: null,
akinwale (Migrated from github.com) commented 2018-02-05 08:42:39 +01:00

LbryWebApi or Lbrydotio, maybe?

LbryWebApi or Lbrydotio, maybe?
akinwale (Migrated from github.com) reviewed 2018-02-05 08:46:04 +01:00
@ -8,116 +9,88 @@ const Lbry = {
pendingPublishTimeout: 20 * 60 * 1000,
};
akinwale (Migrated from github.com) commented 2018-02-05 08:46:03 +01:00

We still need the connect method which is called on app startup, but I guess this is actually desktop-app specific, so probably needs to be moved to the app repo.

We still need the `connect` method which is called on app startup, but I guess this is actually desktop-app specific, so probably needs to be moved to the app repo.
neb-b (Migrated from github.com) requested changes 2018-03-30 01:01:33 +02:00
neb-b (Migrated from github.com) left a comment

It doesn't look like this is using the latest code from lbry-app. I changed a few files with the redesign. If it's just a copy/paste I would re-add the new files.

It also looks like some of the notification code isn't complete. Maybe we should discuss this tomorrow.

It doesn't look like this is using the latest code from `lbry-app`. I changed a few files with the redesign. If it's just a copy/paste I would re-add the new files. It also looks like some of the notification code isn't complete. Maybe we should discuss this tomorrow.
@ -279,0 +200,4 @@
return target[name];
}
return (params = {}) =>
neb-b (Migrated from github.com) commented 2018-03-30 00:52:21 +02:00

All of the lbry.publish code was removed. The weird stuff with pending publishes was removed from this file and is handled inside the publish reducer

All of the `lbry.publish` code was removed. The weird stuff with pending publishes was removed from this file and is handled inside the `publish` reducer
@ -4,2 +3,3 @@
const LbryApi = {
const Lbryapi = {
enabled: true,
exchangePromise: null,
neb-b (Migrated from github.com) commented 2018-03-30 00:54:16 +02:00

I like LbryIncApi.

Whatever works though, I agree it might be nicer to have a larger difference between this and lbry

I like `LbryIncApi`. Whatever works though, I agree it might be nicer to have a larger difference between this and `lbry`
neb-b (Migrated from github.com) commented 2018-03-30 00:55:03 +02:00

Did we decide on something like DO_NOTIFY?

Did we decide on something like `DO_NOTIFY`?
neb-b (Migrated from github.com) commented 2018-03-30 00:57:41 +02:00
https://github.com/lbryio/lbry-app/blob/master/src/renderer/redux/actions/wallet.js#L12
akinwale (Migrated from github.com) reviewed 2018-04-04 09:30:45 +02:00
akinwale (Migrated from github.com) commented 2018-04-04 09:30:45 +02:00

Did we decide on something like DO_NOTIFY?

Yes, we did. I was supposed to delete the src/redux/actions/app.js file. It's not used anywhere in lbry-redux at this point.

You can see the notifications related code in src/redux/actions/notification.js, src/redux/reducers/notification.js and src/redux/selectors/notification.js. We'll need to update lbry-app to make use of the new action, which will be the next step after the merge is completed.

> Did we decide on something like `DO_NOTIFY`? Yes, we did. I was supposed to delete the `src/redux/actions/app.js` file. It's not used anywhere in `lbry-redux` at this point. You can see the notifications related code in `src/redux/actions/notification.js`, `src/redux/reducers/notification.js` and `src/redux/selectors/notification.js`. We'll need to update `lbry-app` to make use of the new action, which will be the next step after the merge is completed.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-redux#1
No description provided.