Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

Conversation

@brianlovin
Copy link
Contributor

@brianlovin brianlovin commented May 23, 2018

Status

  • WIP
  • Ready for review
  • Needs testing

Deploy after merge (delete what needn't be deployed)

cc @mxstbr to discuss how we want to approach redux + currentUser concept. Proof of concept in b7b58b5

@spectrum-bot
Copy link

spectrum-bot bot commented May 23, 2018

Warnings
⚠️

These modified files do not have Flow enabled:

  • mobile/components/Avatar/style.js
  • src/components/rich-text-editor/style.js

Generated by 🚫 dangerJS

@brianlovin
Copy link
Contributor Author

Hey @mxstbr, this is getting to be really big, so let's merge it asap to avoid conflicts with other mobile branches. There's still a lot of jank and bugs abound, but the notifications view now looks good!

You'll also see how I'm constructing some utility components for lists: 41ebac8

Those components are now sitting underneath threads, direct messages, and notifications. There might be a bit more refactoring to do in there, but so far it's really nice to develop with (much better than how we approached lists on web :P)

I also ported over our icon file, but it has some different implementation than on web since react native SVG behaves a bit different: 7729264

@brianlovin
Copy link
Contributor Author

For context, here's a before/after too on DMs!

frame

@mxstbr
Copy link
Contributor

mxstbr commented May 25, 2018

Cleaned up most of the nitpicks, let's discuss about the others before merging!

@brianlovin
Copy link
Contributor Author

@mxstbr those last few commits address the rest of your concerns.

I'm still experiencing some pretty bad jank with our infinite list component, so let's chat about how we should approach that.

And lmk how you feel about 4137823 :)


class WithCurrentUser extends React.Component<Props> {
render() {
return this.props.render({ currentUser: this.props.data.user });
Copy link
Contributor

Choose a reason for hiding this comment

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

Overall this feels pretty great from reading the code, how'd it feel writing it?

Nitpick: let's make this accept either children or render: this.props.children ? this.props.children({}) : this.props.render({})

@mxstbr
Copy link
Contributor

mxstbr commented May 25, 2018

I'm still experiencing some pretty bad jank with our infinite list component

What kind of jank? Do you have some more specific words for me?

@brianlovin
Copy link
Contributor Author

What kind of jank? Do you have some more specific words for me?

List items collapsing, but I think this is partly because of my WithCurrentUser wrapping component - I'm digging in now.

@mxstbr
Copy link
Contributor

mxstbr commented May 25, 2018

Ohh I've seen that collapsing in the messages! Try clicking on a shortened quote in a message to open it up, and for some reason some other messages collapse into nothingness—it's super weird!

@brianlovin
Copy link
Contributor Author

brianlovin commented May 25, 2018

429cea5 improves the withCurrentUser behavior - we now expose a "query-component-like" component that can be used like:

<CurrentUser>
  {({ currentUser }) => (
    // ...
  )}
</CurrentUser>

or

<CurrentUser render={({ currentUser }) => (
  // ...
)} />

In addition, there's a proper hoc for withCurrentUser (that still uses <CurrentUser> behind the scenes!)

All that being said - I'm still seeing some list items collapsing in the DM inbox, notifications, messages, threads, etc. That seems like a separate issue for us to debug though, huH?

@brianlovin
Copy link
Contributor Author

@mxstbr if you pull this latest branch can you see if your DM threads collapse? This seems to be a new bug introduced overnight or by me this morning, because they didn't collapse last night.

Copy link
Contributor

@mxstbr mxstbr left a comment

Choose a reason for hiding this comment

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

Super nice, great work, this is awesome and gets us much closer to shippability! 👏

Wanna open an issue about the collapsing bug? It's always happened, it has nothing to do with this PR. I thought it was a simulator thing, I haven't experienced in on device yet, but I obviously can't run on device since Androids broken.

mxstbr
mxstbr previously requested changes May 25, 2018
Copy link
Contributor

@mxstbr mxstbr left a comment

Choose a reason for hiding this comment

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

Just gotta fix Flow and Peril, apparently

@brianlovin
Copy link
Contributor Author

Wanna open an issue about the collapsing bug? It's always happened, it has nothing to do with this PR. I thought it was a simulator thing, I haven't experienced in on device yet, but I obviously can't run on device since Androids broken.

I'm experiencing it on-device as well - happens a lot when anything is paginated, too. It's super weird. I'll open another issue now.

@brianlovin
Copy link
Contributor Author

Flow is passing for me locally :/

This PR might have gotten too big for Peril to work

@mxstbr
Copy link
Contributor

mxstbr commented May 25, 2018

Not talking about peril, the Circle test_static_js job's failing, so it might be eslint?

@brianlovin
Copy link
Contributor Author

@mxstbr any ideas on that snapshot failure in test_web? super weird

@mxstbr
Copy link
Contributor

mxstbr commented May 25, 2018

Ah fuck that's my bad I forgot to update that. I added an id field to robo messages so that the key extraction of the InfiniteList would just work! Just update it and push the updated one, sorry about that.

Copy link
Contributor

@mxstbr mxstbr left a comment

Choose a reason for hiding this comment

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

SHIPIT

@brianlovin brianlovin merged commit 8fc36b6 into alpha May 25, 2018
@brianlovin brianlovin deleted the mobile-notifications branch May 25, 2018 15:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants