Discovery UI #2477

Merged
NetOpWibby merged 12 commits from discovery into master 2019-06-19 17:34:17 +02:00
NetOpWibby commented 2019-05-10 23:15:43 +02:00 (Migrated from github.com)

Changes

  • Added new trending homepage with tag follower interface
  • Consistency improvements
    • FileCard, FileTile, and ChannelTile are merged into one component FileListItem
    • Got rid of a decent amount of associated styles

Notes

  • This is not mergeable. But it's in a state where it can begin to be reviewed. I would ignore the .scss files for now. I need to make a PR to github.com/lbryio/color before the styles are complete.
  • There are a number of UI issues that I am aware of (mostly overlap issues, things not wrapping). I just want to get some eyes on the core changes while I finish up the rest of the small fixes.
  • Depends on https://github.com/lbryio/components/pull/10
#### Changes - Added new trending homepage with tag follower interface - Consistency improvements - FileCard, FileTile, and ChannelTile are merged into one component `FileListItem` - Got rid of a decent amount of associated styles ## Notes - This is not mergeable. But it's in a state where it can begin to be reviewed. I would ignore the `.scss` files for now. I need to make a PR to github.com/lbryio/color before the styles are complete. - There are a number of UI issues that I am aware of (mostly overlap issues, things not wrapping). I just want to get some eyes on the core changes while I finish up the rest of the small fixes. - Depends on https://github.com/lbryio/components/pull/10
kauffj (Migrated from github.com) reviewed 2019-05-10 23:15:43 +02:00
kauffj commented 2019-05-15 16:38:43 +02:00 (Migrated from github.com)

Attempted to run the discover branch and encountered errors using the UI. I'm going to do a code review, but I'm unable to do a UI/UX review.

Screenshot from 2019-05-15 10-37-12

Attempted to run the `discover` branch and encountered errors using the UI. I'm going to do a code review, but I'm unable to do a UI/UX review. ![Screenshot from 2019-05-15 10-37-12](https://user-images.githubusercontent.com/530774/57784208-86b01180-76fd-11e9-93ab-aa4ab232357c.png)
kauffj (Migrated from github.com) reviewed 2019-05-15 16:45:42 +02:00
kauffj (Migrated from github.com) commented 2019-05-15 16:40:50 +02:00

Maybe tag-chooser or tag-selector or something like this?

This component should also be named the same or similar as the outer class name, rather than DiscoveryFirstRun.

Maybe `tag-chooser` or `tag-selector` or something like this? This component should also be named the same or similar as the outer class name, rather than `DiscoveryFirstRun`.
kauffj (Migrated from github.com) commented 2019-05-15 16:43:30 +02:00

Why delete and toggle? Shouldn't it be just toggle or delete and add?

Why delete and toggle? Shouldn't it be just toggle or delete and add?
kauffj (Migrated from github.com) commented 2019-05-15 16:43:43 +02:00

This will presumably change with @seanyesmunt's work

This will presumably change with @seanyesmunt's work
kauffj (Migrated from github.com) commented 2019-05-15 16:44:48 +02:00

I would prefer we simply toggle classes and have cleaner CSS than using negation rules.

I would prefer we simply toggle classes and have cleaner CSS than using negation rules.
neb-b commented 2019-05-15 17:47:23 +02:00 (Migrated from github.com)

I will be making a number of changes to this branch today as I wire up redux.

I will be making a number of changes to this branch today as I wire up redux.
neb-b (Migrated from github.com) reviewed 2019-05-15 18:43:24 +02:00
neb-b (Migrated from github.com) commented 2019-05-15 18:43:24 +02:00

The idea was that sometimes you might want to create a tag, but not follow it. ex: on the publish page

Creating/deleting a tag removes it from the knownTags. Deleting a tag also removes it from followedTags.

In this flow, you might want to delete recommended tags that you know you won't use again. Or use tags for your content that you never plan to follow.

The idea was that sometimes you might want to create a tag, but not follow it. ex: on the publish page Creating/deleting a tag removes it from the `knownTags`. Deleting a tag also removes it from `followedTags`. In this flow, you might want to delete recommended tags that you know you won't use again. Or use tags for your content that you never plan to follow.
neb-b (Migrated from github.com) reviewed 2019-06-03 21:50:59 +02:00
neb-b (Migrated from github.com) commented 2019-06-03 21:50:59 +02:00

ref's ftw!

`ref`'s ftw!
neb-b (Migrated from github.com) reviewed 2019-06-04 05:22:59 +02:00
@ -12,6 +12,7 @@
<meta property="og:description" content="All your favorite LBRY content in your browser." />
<meta property="og:image" content="/og.png" />
<!-- @endif -->
<meta name="viewport" content="width=device-width, initial-scale=1" />
neb-b (Migrated from github.com) commented 2019-06-04 05:22:59 +02:00

@kauffj You said not to build a mobile layout, but you didn't say not to create a new desktop layout that just happens to look good on mobile too.

@kauffj You said not to build a mobile layout, but you didn't say _not_ to create a new desktop layout that just happens to look good on mobile too.
neb-b (Migrated from github.com) reviewed 2019-06-04 05:31:34 +02:00
neb-b (Migrated from github.com) commented 2019-06-04 05:31:34 +02:00

Both of these can be moved into their respective components and use persisted local state to manage if we should show them or not.

Both of these can be moved into their respective components and use persisted local state to manage if we should show them or not.
neb-b (Migrated from github.com) reviewed 2019-06-04 05:56:39 +02:00
neb-b (Migrated from github.com) commented 2019-06-04 05:56:39 +02:00

I need to add the drop to delete functionality. You can ignore this file for now. Waiting to hear back on this:
https://github.com/atlassian/react-beautiful-dnd/issues/1331

I need to add the drop to delete functionality. You can ignore this file for now. Waiting to hear back on this: https://github.com/atlassian/react-beautiful-dnd/issues/1331
neb-b (Migrated from github.com) reviewed 2019-06-04 06:04:32 +02:00
@ -0,0 +1,69 @@
// @flow
neb-b (Migrated from github.com) commented 2019-06-04 06:04:31 +02:00

Need to cleanup this file

Need to cleanup this file
neb-b (Migrated from github.com) reviewed 2019-06-04 06:05:07 +02:00
neb-b (Migrated from github.com) commented 2019-06-04 06:05:07 +02:00

Will update these and add constants

Will update these and add constants
neb-b (Migrated from github.com) reviewed 2019-06-04 06:06:18 +02:00
neb-b (Migrated from github.com) commented 2019-06-04 06:06:18 +02:00

Not really a fan of sort. This is the item on the right side of the header. Currently the two pages that use this are the homepage (trending/best/new) and search feedback (satisfied with results?)

Sort isn't really a good name.

Not really a fan of `sort`. This is the item on the right side of the header. Currently the two pages that use this are the homepage (trending/best/new) and search feedback (satisfied with results?) Sort isn't really a good name.
kauffj (Migrated from github.com) reviewed 2019-06-05 00:21:44 +02:00
kauffj (Migrated from github.com) left a comment

I'm not done but I have to go home.

I'm not done but I have to go home.
kauffj (Migrated from github.com) commented 2019-06-04 23:35:00 +02:00

Completely/somewhat out of scope, but I think it'd be cool if we had a tool that reported on changes to the bundle size whenever package.json changes.

Completely/somewhat out of scope, but I think it'd be cool if we had a tool that reported on changes to the bundle size whenever `package.json` changes.
kauffj (Migrated from github.com) commented 2019-06-04 23:44:32 +02:00

maybe main-wrapper-inner?

maybe `main-wrapper-inner`?
kauffj (Migrated from github.com) commented 2019-06-04 23:46:46 +02:00

It looked like there are rules still targetting this class but I did not see it added anywhere else...

It looked like there are rules still targetting this class but I did not see it added anywhere else...
kauffj (Migrated from github.com) commented 2019-06-04 23:53:47 +02:00

I think using this as a flag to both trigger default behavior and as the string key for storing state is mixing purposes.

Also, are passing header and defaultHeader mutually exclusive? If so, maybe omitting header can trigger default behavior and we can be explicit about the key being for state storage.

I think using this as a flag to both trigger default behavior and as the string key for storing state is mixing purposes. Also, are passing `header` and `defaultHeader` mutually exclusive? If so, maybe omitting `header` can trigger default behavior and we can be explicit about the key being for state storage.
kauffj (Migrated from github.com) commented 2019-06-04 23:55:21 +02:00

Probably should just be named file_sort.

Probably should just be named `file_sort`.
kauffj (Migrated from github.com) commented 2019-06-04 23:58:17 +02:00

I believe it's possible to create a Claim intersection type that includes both of these

I believe it's possible to create a `Claim` intersection type that includes both of these
kauffj (Migrated from github.com) commented 2019-06-05 00:00:55 +02:00

Out of scope, but in case you're doing any relevant refactoring, this is dying / should die and should instead be a set of 0...n objectionable attributes, each of which the user can opt out of displaying individually.

Out of scope, but in case you're doing any relevant refactoring, this is dying / should die and should instead be a set of `0...n` objectionable attributes, each of which the user can opt out of displaying individually.
kauffj (Migrated from github.com) commented 2019-06-05 00:02:39 +02:00

Why stop propagation here?

Why stop propagation here?
kauffj (Migrated from github.com) commented 2019-06-05 00:05:08 +02:00

What about privileging tags I follow? Also, the slice should be sorted or otherwise consistently ordered (one claim may have tags apple, banana, orange, while the other has orange, banana, apple).

What about privileging tags I follow? Also, the slice should be sorted or otherwise consistently ordered (one claim may have tags `apple, banana, orange`, while the other has `orange, banana, apple`).
@ -91,0 +19,4 @@
return (
<main className={classnames('main', className)}>
{/* @if TARGET='app' */}
{showUpgradeButton && (
kauffj (Migrated from github.com) commented 2019-06-05 00:06:47 +02:00

👏

:clap:
kauffj (Migrated from github.com) commented 2019-06-05 00:08:12 +02:00

IMO this isn't help text and we should reserve help for content that is specifically aiding/teaching usage (please bring up on standup if you disagree and/or think we haven't been doing this). I think it is better to add a separate style called "empty" or similar for this type of styling. It's fine if they're even styled identically for now, but using distinct names will ease later style revisions.

IMO this isn't help text and we should reserve `help` for content that is specifically aiding/teaching usage (please bring up on standup if you disagree and/or think we haven't been doing this). I think it is better to add a separate style called "empty" or similar for this type of styling. It's fine if they're even styled identically for now, but using distinct names will ease later style revisions.
@ -54,12 +41,8 @@ class RewardSummary extends React.Component<Props> {
navigate="/$/rewards"
label={hasRewards ? __('Claim Rewards') : __('View Rewards')}
kauffj (Migrated from github.com) commented 2019-06-05 00:09:26 +02:00

boooo

boooo
kauffj (Migrated from github.com) commented 2019-06-05 00:09:38 +02:00

it's fine though, I do it too

it's fine though, I do it too
kauffj (Migrated from github.com) commented 2019-06-05 00:13:23 +02:00

Mildly better if anything passing a class name could simply wrap the component or if there are distinct, enumerable styles to allow passing rather than this pattern (anything passing this is now complected with the component).

Mildly better if anything passing a class name could simply wrap the component or if there are distinct, enumerable styles to allow passing rather than this pattern (anything passing this is now complected with the component).
kauffj (Migrated from github.com) commented 2019-06-05 00:14:26 +02:00

I don't understand this comment but happy to help if I can

I don't understand this comment but happy to help if I can
@ -0,0 +1,69 @@
// @flow
kauffj (Migrated from github.com) commented 2019-06-05 00:14:50 +02:00

I didn't read it

I didn't read it
kauffj (Migrated from github.com) commented 2019-06-05 00:15:26 +02:00

What if I'm not following any tags?

What if I'm not following any tags?
kauffj (Migrated from github.com) commented 2019-06-05 00:16:01 +02:00

Make sure to put "removed vaguely threatening message from transaction list" in the release notes

Make sure to put "removed vaguely threatening message from transaction list" in the release notes
kauffj (Migrated from github.com) commented 2019-06-05 00:16:55 +02:00

I disagree with this. Let me learn that it is possible and what it looks like. Put the form and/or buttons in a non-interactive state if we think it's poor UX to display a form that cannot be submitted.

I disagree with this. Let me learn that it is possible and what it looks like. Put the form and/or buttons in a non-interactive state if we think it's poor UX to display a form that cannot be submitted.
kauffj (Migrated from github.com) commented 2019-06-05 00:20:59 +02:00

This probably shouldn't be an h1

This probably shouldn't be an h1
kauffj (Migrated from github.com) commented 2019-06-05 00:21:22 +02:00

Even if it is an h1, just give it a class like file-list__header-text or whatever

Even if it is an `h1`, just give it a class like `file-list__header-text` or whatever
neb-b (Migrated from github.com) reviewed 2019-06-05 07:26:24 +02:00
neb-b (Migrated from github.com) reviewed 2019-06-05 07:28:39 +02:00
neb-b (Migrated from github.com) commented 2019-06-05 07:28:38 +02:00

I agree it was pretty messy. I added persistedStorageKey and use the default header if no header is passed in. If no peristedStorageKey is passed in, it will share state with other instances of the component that don't pass it in.

I added a key for every component right now.

I agree it was pretty messy. I added `persistedStorageKey` and use the default header if no `header` is passed in. If no `peristedStorageKey` is passed in, it will share state with other instances of the component that don't pass it in. I added a key for every component right now.
neb-b (Migrated from github.com) reviewed 2019-06-05 07:31:21 +02:00
neb-b (Migrated from github.com) commented 2019-06-05 07:31:20 +02:00

We don't need to

We don't need to
kauffj (Migrated from github.com) reviewed 2019-06-10 23:45:47 +02:00
kauffj (Migrated from github.com) left a comment

mostly done

mostly done
kauffj (Migrated from github.com) commented 2019-06-10 23:25:24 +02:00

so if I pass nothing or false, it still persists in a global namespace? IMO make all persisting here explicit and do not persist if a value isn't passed

so if I pass nothing or false, it still persists in a global namespace? IMO make all persisting here explicit and do not persist if a value isn't passed
kauffj (Migrated from github.com) commented 2019-06-10 23:26:43 +02:00

headerAltControls? headerSecondaryControls? or same names without the word header?

`headerAltControls`? `headerSecondaryControls`? or same names without the word header?
kauffj (Migrated from github.com) commented 2019-06-10 23:28:42 +02:00

similar to my feedback on the lbry-redux PR, I think using the name trending repeatedly is a mild mistake, because it does things beyond trending

I would call the entire component FileListDiscover and call the above value just uris or something like this

similar to my feedback on the lbry-redux PR, I think using the name trending repeatedly is a mild mistake, because it does things beyond trending I would call the entire component FileListDiscover and call the above value just `uris` or something like this
kauffj (Migrated from github.com) commented 2019-06-10 23:30:47 +02:00

Should this just be a component? Or at least not inlined? Same for the sort parameter below

Should this just be a component? Or at least not inlined? Same for the sort parameter below
kauffj (Migrated from github.com) commented 2019-06-10 23:31:45 +02:00

I'd make a capitalize function since you repeat this four times. It can simply be inlined in the file if it's only used here.

I'd make a capitalize function since you repeat this four times. It can simply be inlined in the file if it's only used here.
kauffj (Migrated from github.com) commented 2019-06-10 23:34:43 +02:00

Is this used?

Is this used?
kauffj (Migrated from github.com) commented 2019-06-10 23:35:42 +02:00

Above comment still stands, especially since you're only using it in one place

Above comment still stands, especially since you're only using it in one place
kauffj (Migrated from github.com) commented 2019-06-10 23:36:06 +02:00

missing i18n

missing i18n
kauffj (Migrated from github.com) commented 2019-06-10 23:37:08 +02:00

out of scope, but this should be a way of saying "max" instead of 8

out of scope, but this should be a way of saying "max" instead of 8
kauffj (Migrated from github.com) commented 2019-06-10 23:38:01 +02:00

--no-verify

`--no-verify`
kauffj (Migrated from github.com) commented 2019-06-10 23:42:21 +02:00

Mildly uncertain about the pattern of relying on the local persisted state of <TagsSelect> being closed to not re-render this. I suppose that is fine though.

Mildly uncertain about the pattern of relying on the local persisted state of `<TagsSelect>` being closed to not re-render this. I suppose that is fine though.
@ -1,45 +1,42 @@
// @flow
kauffj (Migrated from github.com) commented 2019-06-10 23:43:25 +02:00

if I notice another one I won't comment since I know this will be linted eventually

if I notice another one I won't comment since I know this will be linted eventually
@ -43,0 +35,4 @@
</section>
</div>
)}
</React.Fragment>
kauffj (Migrated from github.com) commented 2019-06-10 23:44:00 +02:00

Per comments in Slack, I'm fine with dropping the history, at least temporarily, if that makes this easier/cleaner

Per comments in Slack, I'm fine with dropping the history, at least temporarily, if that makes this easier/cleaner
kauffj (Migrated from github.com) commented 2019-06-10 23:44:41 +02:00

why does the capitalization switch?

why does the capitalization switch?
@ -0,0 +17,4 @@
doToggleTagFollow,
} = props;
const urlParams = new URLSearchParams(search);
kauffj (Migrated from github.com) commented 2019-06-10 23:45:24 +02:00

TIL

TIL
neb-b (Migrated from github.com) reviewed 2019-06-11 17:17:41 +02:00
neb-b (Migrated from github.com) commented 2019-06-11 17:17:41 +02:00

Yeah I wasn't really sure about this. Another option is to always show the injected item. It could be in the third/fourth position if there are more than four items, otherwise, just show at the end.

I figured we would have another on the subscriptions page somewhere.

Yeah I wasn't really sure about this. Another option is to always show the injected item. It could be in the third/fourth position if there are more than four items, otherwise, just show at the end. I figured we would have another on the subscriptions page somewhere.
neb-b (Migrated from github.com) reviewed 2019-06-11 17:22:47 +02:00
@ -43,0 +35,4 @@
</section>
</div>
)}
</React.Fragment>
neb-b (Migrated from github.com) commented 2019-06-11 17:22:46 +02:00

It would, and I'm fine with that for now. I'll remove it/make the other changes in the next PR

It would, and I'm fine with that for now. I'll remove it/make the other changes in the next PR
neb-b (Migrated from github.com) reviewed 2019-06-11 17:24:48 +02:00
neb-b (Migrated from github.com) commented 2019-06-11 17:24:48 +02:00

Because someone stole my computer and changed the titles without me knowing.

Because someone stole my computer and changed the titles without me knowing.
neb-b (Migrated from github.com) reviewed 2019-06-11 17:33:40 +02:00
neb-b (Migrated from github.com) commented 2019-06-11 17:33:39 +02:00

👍 I pulled it out. Possibly there should be FileListHeader component, but I think it helps to keep this logic here, since all of this is related.

👍 I pulled it out. Possibly there should be `FileListHeader` component, but I think it helps to keep this logic here, since all of this is related.
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-desktop#2477
No description provided.