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

Feature/plan/dmp overview static frontend #356

Open
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

fraserclark
Copy link
Collaborator

Description

Pulling in the remaining parts of DMP plans.

  • Downloads
  • Feedback/Access/Invite
  • Publish flow

I need to add translations to some of the pages these were built previously just hadn't merged them in properly; Will finish that off tomorrow.

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I updated the CHANGELOG.md and added documentation if necessary
  • I have added tests that prove my fix is effective or that my feature works
  • I have completed manual or automated accessibility testing for my changes
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I wasn't sure how translations would work with this page, so kind of left its pretty minimal. As guess a lot of the values will come from the database etc?

@@ -277,6 +300,149 @@ const PlanOverviewPage: React.FC = () => {
</div>
</SidebarPanel>
</LayoutWithPanel>


<Modal isDismissable isOpen={isPublishModalOpen}>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Modal for publish flow. I wonder whether these modals should be componentized?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree that eventually we should make all of these into shared components.

font-weight: 400;
}
}

.react-aria-Radio {
display: flex;
align-items: center;
align-items: flex-start;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Potentially semi breaking change - but the radio button when we had helper text it put the "radio" in an awkward location, so I placed at the top again.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it'll be fine. It didn't break other pages with radio buttons as far as I can tell

Copy link
Collaborator

@jupiter007 jupiter007 left a comment

Choose a reason for hiding this comment

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

Thanks Fraser. I just had a few comments. Some of these changes do need to be made to address linting issues.


/* File format selection */
.formatChoices {
display: flex;
Copy link
Collaborator

Choose a reason for hiding this comment

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

For any space styles, like gap or margin, are we supposed to be using the shared --space-# styles?



expect.extend(toHaveNoViolations);
jest.mock('next-intl', () => ({
Copy link
Collaborator

Choose a reason for hiding this comment

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

L9 - Just an FYI. If you merge in the latest from development, you will get the mock for useTranslations for free, since it was added to the 1jest.setup.ts1 file




<LayoutWithPanel>
Copy link
Collaborator

Choose a reason for hiding this comment

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

L99: I think we can use LayoutContainer here instead of LayoutWithPanel since there is no sidebar on this page.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good spot - will fix

</Form>
</div>
</ContentContainer>
<SidebarPanel/>
Copy link
Collaborator

Choose a reason for hiding this comment

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

L192: Don't think the SidebarPanel is needed here?

<div className={styles.formGroup}>
<h3 className={styles.sectionLabel}>What should this person be
able to do?</h3>
<CheckboxGroup
Copy link
Collaborator

Choose a reason for hiding this comment

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

L133: Just an FYI - We have a shared CheckboxGroupComponent now at components/Form/CheckboxGroup. No worries though. We can update this as we're working on hooking up the page.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah sorry, I will double check these iņ the future

@@ -277,6 +300,149 @@ const PlanOverviewPage: React.FC = () => {
</div>
</SidebarPanel>
</LayoutWithPanel>


<Modal isDismissable isOpen={isPublishModalOpen}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree that eventually we should make all of these into shared components.

font-weight: 400;
}
}

.react-aria-Radio {
display: flex;
align-items: center;
align-items: flex-start;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it'll be fine. It didn't break other pages with radio buttons as far as I can tell

}

// Form submission logic
console.log('Inviting user:', {email, accessType});
Copy link
Collaborator

Choose a reason for hiding this comment

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

L47: Did you mean to keep the console.log here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will remove


<div className={styles.formHelp}>
<p>
When you click <strong>Grant access</strong> we'll send an
Copy link
Collaborator

Choose a reason for hiding this comment

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

L176, 181, 182 - I think we need to replace all apostrophes in the page with an entity like &lsquo;, otherwise the build will pick up on the linting error.

@@ -14,6 +23,15 @@ import {

const PlanOverviewPage: React.FC = () => {
const t = useTranslations('PlanOverview');
let [isPublishModalOpen, setPublishModalOpen] = useState(false);
Copy link
Collaborator

Choose a reason for hiding this comment

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

L26, 27, 28 - The 'let' in all three lines can be changed to a 'const' since these do not change.

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.

2 participants