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

App Center (read-only) #625

Merged
merged 62 commits into from Apr 14, 2019
Merged
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
1a0746f
ZoomableCards: first version
bpierre Feb 20, 2019
e0b8778
ESLint fixes
bpierre Feb 20, 2019
64a5c73
Merge branch 'master' into app-center
bpierre Feb 23, 2019
09e4491
Prevent unnecessary renders of MenuPanel
bpierre Feb 25, 2019
6339dd6
Prevent unnecessary renders of SignerPanel
bpierre Feb 25, 2019
1280e61
Add known apps
bpierre Feb 25, 2019
b6ccfd6
Add “Label” as a text style component
bpierre Feb 26, 2019
639476f
Start using a constant for grid units
bpierre Feb 26, 2019
73dd19c
ZoomableCards: tweaks and performance optimizations
bpierre Feb 26, 2019
d838766
App store main interface
bpierre Feb 26, 2019
070e994
AppContent: breakpoints without the menu width
bpierre Feb 26, 2019
ea818d9
Add missing info block below app versions
bpierre Feb 26, 2019
501665e
ESLint fixes
bpierre Feb 26, 2019
99e0da8
Fix small viewports layout
bpierre Feb 27, 2019
928aa3e
Known apps: add source URL
bpierre Feb 27, 2019
f682c05
Upgrade panel
bpierre Feb 27, 2019
6a6982b
ESLint fixes
bpierre Feb 27, 2019
5f0f48f
Merge branch 'master' into app-center
bpierre Feb 28, 2019
8370f06
Merge master into app-center
bpierre Feb 28, 2019
efdcc15
Merge master (Swipe Menu Panel)
bpierre Mar 1, 2019
9aab685
Prop types: add AppCenterAppType
bpierre Mar 4, 2019
d93b9ff
Add apps-utils
bpierre Mar 4, 2019
24997a5
ZoomCard: fix the cards width
bpierre Mar 4, 2019
885f5df
Apps params: move from ?params= to ?p=
bpierre Mar 4, 2019
a7efdee
Use real app data
bpierre Mar 4, 2019
3a572b4
ESLint fix
bpierre Mar 5, 2019
66d253f
Merge master
bpierre Mar 5, 2019
184736b
Apps => App Center
bpierre Mar 5, 2019
d13a4a3
Fix App Center title
bpierre Mar 5, 2019
a968f82
Merge branch 'master' into app-center
bpierre Mar 20, 2019
9903e08
Spacing
bpierre Mar 20, 2019
3e0127d
Fix ESLint
bpierre Mar 20, 2019
d35b3dc
Merge branch 'master' into app-center
sohkai Apr 9, 2019
b5296a3
fix: propagate dao name rather than full locator
sohkai Apr 9, 2019
3046119
fix: propagating params is now done with rather than
sohkai Apr 9, 2019
0608191
fix: remove unused blank component
sohkai Apr 9, 2019
96cb694
fix: remove unused icons
sohkai Apr 10, 2019
db8c94e
fix: cosmetic code improvements to remove unused bits do some clean up
sohkai Apr 10, 2019
7d55fec
fix: add RenderFnType proptype for optional render functions
sohkai Apr 10, 2019
15ffa22
fix: avoid proptypes warnings
sohkai Apr 10, 2019
8bd7100
fix: import lerp rather than redefine it
sohkai Apr 10, 2019
b61d437
UpgradeAppPanel: update text
sohkai Apr 10, 2019
bdd3a3d
Merge branch 'master' into app-center
sohkai Apr 10, 2019
84d82ae
fix: remove transaction notification hooks
sohkai Apr 10, 2019
f993d14
fix: proptypes warnings for SignerPanel
sohkai Apr 10, 2019
fcc9f1f
feat: use local identity badge in app center
sohkai Apr 10, 2019
0c1e9b3
ActionPathsContent: use getAppPath() + coding style
bpierre Apr 14, 2019
dd5c35b
Always define cardRect in the state
bpierre Apr 14, 2019
2dc4f40
Syntax
bpierre Apr 14, 2019
06b1dd6
TABS => SCREENS
bpierre Apr 14, 2019
2648b8e
Update Discover App
bpierre Apr 14, 2019
ac5e14a
Screenshots: remove the open / close state
bpierre Apr 14, 2019
9fa6c4e
Discover Apps: missing icons
bpierre Apr 14, 2019
82fd33e
AppsGrid: pass cards as children instead of a render function
bpierre Apr 14, 2019
4c659b7
Comment + style
bpierre Apr 14, 2019
021a1e4
ESLint fixes
bpierre Apr 14, 2019
2c84c1a
Discover Apps: sort by readiness, update some details, and add pando
sohkai Apr 14, 2019
e8cd486
feat: restart app worker when upgraded (#688)
sohkai Apr 14, 2019
e7a8ba6
fix: update for @aragon/wrapper api cleanup (#690)
sohkai Apr 14, 2019
954b448
App Center: connect to installed repos (#694)
sohkai Apr 14, 2019
8e252e1
chore: upgrade @aragon/wrapper
sohkai Apr 14, 2019
104cff4
UpgradeAppPanel: disable for now
sohkai Apr 14, 2019
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

AppsGrid: pass cards as children instead of a render function

  • Loading branch information...
bpierre committed Apr 14, 2019
commit 82fd33e84e11ab1e509263b4a7047e8a1ee35408
@@ -2,9 +2,8 @@ import React from 'react'
import PropTypes from 'prop-types'
import { breakpoint, font } from '@aragon/ui'
import { AppCenterAppType } from '../../../prop-types'
import AppCardContent from './AppCardContent'

const AppsGrid = React.memo(({ apps, card, onOpenApp }) => (
const AppsGrid = React.memo(({ children }) => (
<div>
<h1
css={`
@@ -31,17 +30,13 @@ const AppsGrid = React.memo(({ apps, card, onOpenApp }) => (
)};
`}
>
{apps.map(app =>
card(app.appName, <AppCardContent app={app} onOpen={onOpenApp} />)
)}
{children}
</div>
</div>
))

AppsGrid.propTypes = {
apps: PropTypes.arrayOf(AppCenterAppType).isRequired,
card: PropTypes.func.isRequired,
onOpenApp: PropTypes.func.isRequired,
children: PropTypes.node,
}

export default AppsGrid
@@ -7,6 +7,7 @@ import { ZoomableCards } from '../../../components/ZoomableCards'
import AppsGrid from './AppsGrid'
import AppContent from './AppContent'
import AppVersions from './AppVersions'
import AppCardContent from './AppCardContent'

class InstalledApps extends React.Component {
static propTypes = {
@@ -29,7 +30,14 @@ class InstalledApps extends React.Component {
<ZoomableCards
currentId={openedAppName}
renderCards={({ card }) => (
<AppsGrid apps={apps} card={card} onOpenApp={onOpenApp} />
<AppsGrid apps={apps}>
{apps.map(app =>
card(
app.appName,
<AppCardContent app={app} onOpen={onOpenApp} />
)
)}
</AppsGrid>
)}
renderOpenedCard={({ currentId }) => {
const app = this.getAppByAppName(currentId)
This conversation was marked as resolved by sohkai

This comment has been minimized.

Copy link
@sohkai

sohkai Apr 10, 2019

Member

This is one aspect of the ZoomableCards API that I'm struggling with.

I think including the currentId in the render prop is useful, since the component rendering ZoomableCards will sometimes be the state / logic container. However, in this case, InstalledApps is more of a UI rendering component that just passes through existing state.

Technically we already have all the information about the opened app package in AppCenter, since that's where the associated state is held, and we could just pass that down to InstalledApps.

This comment has been minimized.

Copy link
@bpierre

bpierre Apr 14, 2019

Author Member

Technically we already have all the information about the opened app package in AppCenter, since that's where the associated state is held, and we could just pass that down to InstalledApps.

Yes, it’s always the same issue: we have the information during the opening transition and while it’s being opened, but we need to save it (here using the currentId) so that it can be displayed during the closing transition.

I think there must be a way to address this problem like react-spring does, by saving the rendered component itself before starting the closing transition. I need to look more into this, as it would be super useful for SidePanel too.

This comment has been minimized.

Copy link
@sohkai

sohkai Apr 14, 2019

Member

Yeah, ran into exactly this while trying to make this bit leaner. And had to fight against this with the SidePanel too today ☹️ .

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.