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

feat: Add new Admin Panel #6881

Merged
merged 14 commits into from Sep 27, 2021
Merged

feat: Add new Admin Panel #6881

merged 14 commits into from Sep 27, 2021

Conversation

kewitz
Copy link
Contributor

@kewitz kewitz commented Sep 16, 2021

Resolves opencollective/opencollective#4693

  • Add new :slug/admin page
  • Implement responsive design and sidebar menu integration for Host Dashboard and Settings
  • Implement responsive Top Bar with pop-over menu
  • Display content from Host Dashboard and existing Collective Settings menu

This is still not the default settings menu, you'll need to add /admin at the end of your collective URL to access it.

@kewitz kewitz self-assigned this Sep 16, 2021
@vercel
Copy link

vercel bot commented Sep 16, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

opencollective-frontend – ./

🔍 Inspect: https://vercel.com/opencollective/opencollective-frontend/DKF6JmAA752rjbgxv3TDJhDb5knD
✅ Preview: https://opencollective-frontend-git-feat-admin-panel-opencollective.vercel.app

opencollective-styleguide – ./

🔍 Inspect: https://vercel.com/opencollective/opencollective-styleguide/EseG7RR6dEV7qix12u4s8SdWw5Yw
✅ Preview: https://opencollective-styleguide-git-feat-admin-panel-opencollective.vercel.app

Copy link
Member

@Betree Betree left a comment

Choose a reason for hiding this comment

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

Not a full reviewed as you're still working on this.

The architecture looks very good; it isolates the legacy stuff nicely.

{
display: 'flex',
},
compose(space, layout, flexbox),
Copy link
Member

Choose a reason for hiding this comment

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

I personally liked that we matched the original behavior of the rebass/grid library, and that we're keeping it simple. Why not use the Container, which supports all these?

Copy link
Contributor Author

@kewitz kewitz Sep 20, 2021

Choose a reason for hiding this comment

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

I don't think we were matching the rebass behavior. I'm pretty much sure you can pass alignItems="center" overflow="hidden" props in rebass.
I'll refactor this to use Container.

Copy link
Member

Choose a reason for hiding this comment

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

It matches the rebass behavior from when we removed the dependency. This file was initially just a copy-paste of https://github.com/rebassjs/grid/blob/master/src/index.js

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Isn't it weird that a div Flex component accepts no CSS flex or div properties?

Copy link
Member

Choose a reason for hiding this comment

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

@kewitz It does accept CSS flex properties already, since it inherits Box which implements styled-system's flexbox. Actually, the properties that you added there are already supported by the component.

lang/en.json Outdated
Comment on lines 71 to 84
"AdminPanel.CollectiveSettings": "Collective Settings",
"AdminPanel.FiscalHostSettings": "Fiscal Host Settings",
"AdminPanel.HostDashboard": "Host Dashboard",
"AdminPanel.Menu.BudgetManagement": "Overview",
"AdminPanel.Menu.Collectives": "Collectives",
"AdminPanel.Menu.Expenses": "Expenses",
"AdminPanel.Menu.FinancialContributions": "Financial Contributions",
"AdminPanel.Menu.HostedCollectives": "Hosted Collectives",
"AdminPanel.Menu.Overview": "Overview",
"AdminPanel.Menu.PendingApplications": "Pending Applications",
"AdminPanel.Menu.Reports": "Reports",
"AdminPanel.OrganizationSettings": "Organization Settings",
"AdminPanel.Settings": "Settings",
"AdminPanel.Settings.Updated": "Settings updated.",
Copy link
Member

Choose a reason for hiding this comment

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

Some duplicated strings in there (eg. Financial Contributions)

Copy link
Member

@Betree Betree left a comment

Choose a reason for hiding this comment

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

The mobile version feels fantastic ✨ Some feedback below, but I think we're mostly good for internal testing.

  • /betree/admin turns out empty when accessed directly

image

When accessed via URL, it works but the menu entry is not selected:
image

  • When I'm on a user profile, is should say User settings not Collective settings
    image

  • When I click the cog icon for a collective, I see this message flashing (~1s) before the page appears. It's probably displayed while fetching, since it appears longer for large hosts on staging

image

  • 🍨 Personal opinion: when you click on "Back" there, it should close the sub-section you're currently looking at and go back to the default one
    image

components/ProfileMenuMemberships.js Show resolved Hide resolved
components/admin-panel/MenuComponents.js Outdated Show resolved Hide resolved
components/admin-panel/MenuComponents.js Outdated Show resolved Hide resolved
components/edit-collective/Form.js Show resolved Hide resolved
pages/adminPanel.js Outdated Show resolved Hide resolved
kewitz and others added 4 commits September 27, 2021 09:53
Co-authored-by: Benjamin Piouffle <benjamin@opencollective.com>
Co-authored-by: Benjamin Piouffle <benjamin@opencollective.com>
Co-authored-by: Benjamin Piouffle <benjamin@opencollective.com>
Co-authored-by: Benjamin Piouffle <benjamin@opencollective.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Admin Panel: Create Admin Panel to unify Host Dashboard and Collective Settings
2 participants