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

Can now add footer from the designer #153

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

adamdavies1
Copy link

@adamdavies1 adamdavies1 commented Apr 19, 2023

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Please also include any acceptance criteria if you have any.

  • Add a section to the designer for adding footer data to the form.
    image

  • This leads to a new section for adding the new footers to the form data

image

  • Once saved this adds to the form data

image

  • And displays on the page when previewing

image

Type of change

Please delete options that are not relevant.

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

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce
the testing if necessary.

Before PR's can be merged they will need to be tested by QA and approved where
applicable. To flag the change to QA assign @XGovFormBuilder/qa as one of the reviewers.

  • Create a new form
  • Click on the new footer menu item
  • Add a new footer
  • Delete a footer
  • Change a footer
  • View the json data on the summary page
  • Click preview to see the footer

Checklist:

  • My changes do not introduce any new linting errors
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have rebased onto main and there are no code conflicts
  • I have checked deployments are working in all environments

@adamdavies1 adamdavies1 changed the title Can now add footer to the deigner Can now add footer from the designer Apr 19, 2023
@adamdavies1 adamdavies1 marked this pull request as ready for review April 19, 2023 15:34
Comment on lines +1 to +24
import React, { MouseEvent } from "react";
import { DataContext } from "../context";
import randomId from "../randomId";
import FooterEdit from "./footer-edit";

type Props = {};

type State = {
showAddFooter: boolean;
footerInput?: any; //TODO: type
id?: string;
};

class FootersEdit extends React.Component<Props, State> {
static contextType = DataContext;
constructor(props) {
super(props);
this.state = {
showAddFooter: false,
footerInput: undefined,
id: "",
};
}

Choose a reason for hiding this comment

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

Is this a duplicate of an already existing file in the same folder? they seem to be doing the same thing?

Copy link

@gio-karunakaran gio-karunakaran left a comment

Choose a reason for hiding this comment

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

just a q for my own curiosity!

@tferns
Copy link

tferns commented May 30, 2023

Is this still relevant @adamdavies1 - looking through all opens prs

@adamdavies1
Copy link
Author

Is this still relevant @adamdavies1 - looking through all opens prs

@tferns So its not a required change, its a change i was working on in my spare time to start to get the designer up to date. Lets hold fire for now until we get all the rest done

@tferns tferns marked this pull request as draft May 30, 2023 09:32
@tferns
Copy link

tferns commented May 30, 2023

Is this still relevant @adamdavies1 - looking through all opens prs

@tferns So its not a required change, its a change i was working on in my spare time to start to get the designer up to date. Lets hold fire for now until we get all the rest done

Sounds good lets convert to draft till we're ready to work on this again 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants