Skip to content
Snippets Groups Projects

Beginnings of author details form

Merged Aanand Prasad requested to merge author-details into master
1 unresolved thread

Integrates formik and theming.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
1 1 import React from 'react'
2 import styled from 'styled-components'
2 3
3 export default ({ value }) => (
4 import { TextField, Button, Heading } from '@pubsweet/ui'
5
6 const Row = styled.div`
7 display: flex;
8 `
9
10 const Cell = styled.div`
11 flex-grow: 1;
12 `
  • Looks good. How does validation and error messaging work with Formik? Do we need to create a new version of ValidatedField?

  • Author Maintainer

    Good question. The validation step itself is handled by the validate prop on the <Formik> component, which takes the values object and returns an object mapping fields to error messages.

    ValidatedField is coupled to redux-form, so we will indeed have to write our own.

  • Aanand Prasad added 2 commits

    added 2 commits

    • fe09886c - refactor(submission): use styled-grid
    • 78edbc76 - fix(submission): tweak subheading size

    Compare with previous version

  • Author Maintainer

    Updated to use grid-styled.

    Edited by Aanand Prasad
  • Tamlyn Rhodes enabled an automatic merge when the pipeline for 78edbc76 succeeds

    enabled an automatic merge when the pipeline for 78edbc76 succeeds

  • It's on auto-merge but linting failed.

  • Aanand Prasad added 1 commit

    added 1 commit

    • cea38811 - chore(submission): remove unused import

    Compare with previous version

  • merged

  • Tamlyn Rhodes mentioned in commit 1638d3d9

    mentioned in commit 1638d3d9

  • Please register or sign in to reply