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

info panel not modal #21990

Merged
merged 8 commits into from Jan 16, 2020
Merged

info panel not modal #21990

merged 8 commits into from Jan 16, 2020

Conversation

@chrisnojima
Copy link
Contributor

chrisnojima commented Jan 10, 2020

  • changes info panel to not be a modal anymore on desktop

note: there is a known issue where if you click on the info panel, click an image, then click all media, then click back the attachments are gone. how state is managed and how the info panel (in general) is organized is a huge mess and needs to be refactored

chrisnojima added 2 commits Jan 10, 2020
WIP
WIP
@@ -3534,6 +3520,26 @@ const refreshBotSettings = async (_: Container.TypedState, action: Chat2Gen.Refr
return Chat2Gen.createSetBotSettings({conversationIDKey, settings, username})
}

const onShowInfoPanel = (action: Chat2Gen.ShowInfoPanelPayload) => {

This comment has been minimized.

Copy link
@chrisnojima

chrisnojima Jan 10, 2020

Author Contributor

mobile only pushes/pops the route

@@ -1,37 +0,0 @@
import * as React from 'react'

This comment has been minimized.

Copy link
@chrisnojima

chrisnojima Jan 10, 2020

Author Contributor

this file basically did nothing, so hoisting the child up a level and replacing it

)
const conversationIDKey: Types.ConversationIDKey =
// @ts-ignore
typeof ownProps.navigation !== 'undefined'

This comment has been minimized.

Copy link
@chrisnojima

chrisnojima Jan 10, 2020

Author Contributor

not bothering to fix these types as this needs to be cleaned up majorly

<Conversation navigation={props.navigation} />
{infoPanelShowing && <InfoPanel />}

This comment has been minimized.

Copy link
@chrisnojima

chrisnojima Jan 10, 2020

Author Contributor

InfoPanel lives here now

@@ -18,7 +18,8 @@ export const isDeviceSecureAndroid: boolean =
: nativeBridge.isDeviceSecure === 'true' || false
export const isTestDevice = nativeBridge.isTestDevice

export const isRemoteDebuggerAttached = typeof __REMOTEDEV__ !== 'undefined'
// @ts-ignore
export const isRemoteDebuggerAttached: boolean = typeof DedicatedWorkerGlobalScope !== 'undefined'

This comment has been minimized.

Copy link
@chrisnojima

chrisnojima Jan 10, 2020

Author Contributor

this never worked on ios, and likely never worked on android

@@ -194,6 +194,8 @@ export type State = Readonly<{
inboxLayout: RPCChatTypes.UIInboxLayout | null // layout of the inbox
inboxSearch?: InboxSearchInfo
inboxShowNew: boolean // mark search as new,
infoPanelShowing: boolean
infoPanelSelectedTab: 'settings' | 'members' | 'attachments' | 'bots' | undefined

This comment has been minimized.

Copy link
@chrisnojima

chrisnojima Jan 10, 2020

Author Contributor

have to keep track of this in the store for desktop now

WIP
@chrisnojima chrisnojima changed the title WIP: info panel not modal info panel not modal Jan 10, 2020
@chrisnojima chrisnojima requested review from mmaxim and keybase/react-hackers Jan 10, 2020
@chrisnojima chrisnojima marked this pull request as ready for review Jan 10, 2020
Copy link
Contributor

mmaxim left a comment

Seems way too wide on desktop, is that intended?

@adamjspooner

This comment has been minimized.

Copy link
Contributor

adamjspooner commented Jan 11, 2020

Agreed (on the width).

@chrisnojima

This comment has been minimized.

Copy link
Contributor Author

chrisnojima commented Jan 11, 2020

Probably was constrained by the animation container before. Likely a 1 liner

@mmaxim

This comment has been minimized.

Copy link
Contributor

mmaxim commented Jan 11, 2020

Behavior is a little weird if you are on a "members" tab from a team, then land on an imp team, since it doesn't have that tab.

@mmaxim

This comment has been minimized.

Copy link
Contributor

mmaxim commented Jan 11, 2020

I think the best fix for that Membes tab situation is to actually maintain two saved tabs, one for teams and one for ad hoc. Since if you just say "if current tab members, and on ad hoc conv, set to attachments" you keep switching the team convs over to attachments, even if you want it to stay on members.

@adamjspooner might have an opinion here.

@adamjspooner

This comment has been minimized.

Copy link
Contributor

adamjspooner commented Jan 11, 2020

Seems okay to me. 👍

@mmaxim

This comment has been minimized.

Copy link
Contributor

mmaxim commented Jan 11, 2020

We can maybe move this to another PR, but I think this thing needs some kind of loading state when entering a conv. It was less of a problem before since it wasn't likely to click into a conv and immediately hit the info panel, but now if you go into a conv with a ton of people, and you have the info panel open, you just look at a blank state with no spinner while we churn away loading everything.

@chrisnojima

This comment has been minimized.

Copy link
Contributor Author

chrisnojima commented Jan 11, 2020

As mentioned here how this works internally needs attention. I think we should do it in another pr. It can happen this sprint

WIP
@chrisnojima

This comment has been minimized.

Copy link
Contributor Author

chrisnojima commented Jan 13, 2020

@mmaxim we ok to merge this

@mmaxim

This comment has been minimized.

Copy link
Contributor

mmaxim commented Jan 13, 2020

Fine to merge, but we need to fix that Members tab thing before release.

WIP
@chrisnojima

This comment has been minimized.

Copy link
Contributor Author

chrisnojima commented Jan 16, 2020

@mmaxim merging when ci passes

WIP
@chrisnojima chrisnojima merged commit bbf5f21 into master Jan 16, 2020
2 checks passed
2 checks passed
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
@chrisnojima chrisnojima deleted the nojima/HOTPOT-move-info-1 branch Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.