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

fix: #1494 Port AdminButton from gatsby to next.js #1515

Closed
wants to merge 1 commit into from
Closed

fix: #1494 Port AdminButton from gatsby to next.js #1515

wants to merge 1 commit into from

Conversation

sonechca
Copy link
Contributor

@sonechca sonechca commented Dec 11, 2020

Issue This PR Addresses

Fixed: #1494

Type of Change

  • Bugfix: Change which fixes an issue
  • New Feature: Change which adds functionality
  • Documentation Update: Change which improves documentation
  • UI: Change which improves UI

Description

Checklist

  • Quality: This PR builds and passes our npm test and works locally
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not (if applicable)
  • Documentation: This PR includes updated/added documentation to user exposed functionality or configuration variables are added/changed or an explanation of why it does not(if applicable)

@tonyvugithub
Copy link
Contributor

@sonechca : Hi there, we are in the process of reviewing these migrated to Next PRs. Just wonder if you are still interested to work on this as we would like you to make some changes to your PR. Please let us know in case you decided to drop this then we can assign the issue to others. Thank you.

Copy link
Contributor

@humphd humphd left a comment

Choose a reason for hiding this comment

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

A couple of things to do, and also, please git mv the file src/frontend/next/src/components/AdminButtons/AdminButtons.tsx to src/frontend/next/src/components/AdminButtons.tsx (i.e., get rid of the directory).

@@ -0,0 +1,4 @@
import { createContext } from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

Delete this file.

import { IconButton } from '@material-ui/core';
import FlagIcon from '@material-ui/icons/Flag';
import DeleteIcon from '@material-ui/icons/Delete';
import { UserStateContext } from '../../contexts/User/UserContext';
Copy link
Contributor

Choose a reason for hiding this comment

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

Once #1521 lands (hopefully soon), we can change this to:

import { useUser } from '../UserProvider';


function AdminButtons() {
const classes = useStyles();
const user = useContext(UserStateContext);
Copy link
Contributor

Choose a reason for hiding this comment

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

This can become:

const user = useUser();

@humphd
Copy link
Contributor

humphd commented Jan 20, 2021

Also, you need a rebase on master to pickup the package.json changes:

git checkout master
git pull upstream master
git checkout Port-AdminButtons
git rebase master
...fix conflicts...
git add src/frontend/next/package.json
git rebase --continue

@yuanLeeMidori yuanLeeMidori changed the title Port AdminButton from gatsby to next.js fix: #1494 Port AdminButton from gatsby to next.js Jan 21, 2021
@humphd humphd added this to the 1.5 Release milestone Jan 22, 2021
@humphd
Copy link
Contributor

humphd commented Jan 22, 2021

@sonechca what's happening here? I'd like to get this shipped today.

@humphd humphd modified the milestones: 1.5 Release, 1.6 Release Jan 22, 2021
@humphd
Copy link
Contributor

humphd commented Jan 22, 2021

We decided to move this to 1.6, and we'll take the work in #1504 to add a dummy AdminButtons component for now.

@PedroFonsecaDEV PedroFonsecaDEV added the area: nextjs Nextjs related issues label Jan 26, 2021
@birtony birtony assigned yuanLeeMidori and unassigned sonechca Jan 26, 2021
@yuanLeeMidori
Copy link
Contributor

close by #1619

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: nextjs Nextjs related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[next] Port AdminButtons/ to NextJS
5 participants