Channel creation and editing #36
No reviewers
Labels
No labels
area: devops
area: discovery
area: docs
area: livestream
consider soon
dependencies
documentation
Epic
good first issue
hacktoberfest
help wanted
icebox
level: 1
level: 2
level: 3
level: 4
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
on hold
priority: blocker
priority: high
priority: low
priority: medium
resilience
Tom's Wishlist
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbry-react-native#36
Loading…
Reference in a new issue
No description provided.
Delete branch "channel-creator"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -208,0 +208,4 @@
if (uris) {
uris = uris.filter(uri => uri && uri.length > 0);
}
(update to 0.40?)
Aside from updating to 0.40, I think it is a good idea to comment code like this so that others (including future you, which is a different person than now you):
@ -259,0 +324,4 @@
})
.catch(err => {
if (failure) {
failure(err.message ? err.message : 'The image failed to upload.');
do we know anything about the user at the time this is happening? any ability to get a partial channel name or something else in here aside from pure random?
this makes me uncomfortable, could a real file inspection be done when the file extension is missing?
(much less importantly and similar to a previous comment, you can save a check by doing the trim at assignment)
also get that 0 out of there 😛
parseURI
returnsisChannel
i18n
i18n
@ -20,0 +27,4 @@
if (lastRoute === Constants.DRAWER_ROUTE_PUBLISH_FORM && routeName === Constants.DRAWER_ROUTE_PUBLISH) {
canPushStack = false;
}
I'll be honest that I don't really understand what the above is doing, but it smells hackish 👃
@ -171,3 +187,3 @@
dispatch(NavigationActions.back());
if (DrawerRoutes.indexOf(route) === -1 && isURIValid(route)) {
if (!DrawerRoutes.includes(route) && !InnerDrawerRoutes.includes(route) && isURIValid(route)) {
dispatchNavigateToUri(dispatch, nav, route, true);
This also smells. I'm guessing all of this is to properly retain navigation on channel creation and publishing, especially in the cases where you might be auto-navigated/directed to those areas?
I suspect there's a design that's a little cleaner here. Ping me tomorrow and we can get on a call to discuss.
is err.message guaranteed to be set?
@ -171,3 +187,3 @@
dispatch(NavigationActions.back());
if (DrawerRoutes.indexOf(route) === -1 && isURIValid(route)) {
if (!DrawerRoutes.includes(route) && !InnerDrawerRoutes.includes(route) && isURIValid(route)) {
dispatchNavigateToUri(dispatch, nav, route, true);
The drawer stack is a LIFO structure used for maintaining the navigation state, since the drawer navigator doesn't properly support back navigation out of the box.
In retrospect, the ideal solution here would be to use a nested StackNavigator for these pages (list / selector and the form), but I had already started down this road and didn't feel like separating into multiple components).
I would hope so!
@ -20,0 +27,4 @@
if (lastRoute === Constants.DRAWER_ROUTE_PUBLISH_FORM && routeName === Constants.DRAWER_ROUTE_PUBLISH) {
canPushStack = false;
}
On the publish page, we have two screens: the gallery selector and the publish form.
On the channels page, we have the channel list and the channel editor form.
This is essentially checking if we're on one of the pages (or a related sub screen) before pushing into the stack.