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

Inline array improvements #4671

Merged
merged 23 commits into from
Sep 12, 2024
Merged

Inline array improvements #4671

merged 23 commits into from
Sep 12, 2024

Conversation

stuartromanek
Copy link
Member

@stuartromanek stuartromanek commented Aug 6, 2024

Summary

Related PRs

Tests

What are the specific steps to test this change?

Sample fields

Simple inline array

contactInfoInline: {
  label: 'Contact information Inline',
  type: 'array',
  inline: true,
  titleField: 'city',
  fields: {
    add: {
      city: {
        type: 'string',
        label: 'String One'
      },
      email: {
        type: 'string',
        label: 'String Two'
      }
    }
  }
},

Inline array with no title field and an inner inline array

contactInfoInlineNoTitleField: {
  label: 'Contact information Inline',
  type: 'array',
  inline: true,
  fields: {
    add: {
      city: {
        type: 'string',
        label: 'City'
      },
      email: {
        type: 'email',
        label: 'Email address'
      },
      array: {
        type: 'array',
        label: 'Another Array',
        inline: true,
        titleField: 'city',
        whenEmpty: {
          label: 'Wowee!',
          icon: 'file-document-icon'
        },
        fields: {
          add: {
            city: {
              type: 'string',
              label: 'City'
            },
            email: {
              type: 'email',
              label: 'Email address'
            }
          }
        }
      }
    }
  }
},

Inline table

  contactInfoTable: {
    label: 'Contact information Table',
    type: 'array',
    inline: true,
    style: 'table',
    draggable: true,
    titleField: 'city',
    fields: {
      add: {
        city: {
          type: 'string',
          label: 'City'
        },
        email: {
          type: 'email',
          label: 'Email address'
        }
      }
    }
  },
  1. Test the functionality and interactivity of the field configurations above

What kind of change does this PR introduce?

(Check at least one)

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Build-related changes
  • Other

@stuartromanek stuartromanek marked this pull request as ready for review August 6, 2024 19:52
ValJed
ValJed previously requested changes Aug 19, 2024
Copy link
Contributor

@ValJed ValJed left a comment

Choose a reason for hiding this comment

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

Conflicts to resolve.
Some questions / feedback about style / perf

@stuartromanek
Copy link
Member Author

was able to implement most feedback @ValJed

@stuartromanek stuartromanek requested review from haroun and removed request for ValJed August 30, 2024 19:01
@stuartromanek
Copy link
Member Author

tagging @haroun in on finishing this up as Val is out

@haroun haroun requested a review from myovchev September 5, 2024 14:39
myovchev
myovchev previously approved these changes Sep 9, 2024
Copy link
Contributor

@myovchev myovchev left a comment

Choose a reason for hiding this comment

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

💯

@stuartromanek stuartromanek merged commit 2faca91 into main Sep 12, 2024
8 checks passed
@stuartromanek stuartromanek deleted the inline-array-improvements branch September 12, 2024 15:54
haroun added a commit that referenced this pull request Sep 12, 2024
* main:
  PRO-6578: auto import of inline images (#4723)
  Inline array improvements (#4671)
  take credit for the fix as well as the "change" (#4725)
  PRO-6576 fix default values for object fields in widgets and generally unify newInstance implementations (#4722)
haroun added a commit to haroun/apostrophe that referenced this pull request Sep 16, 2024
* upstream/main: (77 commits)
  PRO-6578: auto import of inline images (apostrophecms#4723)
  Inline array improvements (apostrophecms#4671)
  take credit for the fix as well as the "change" (apostrophecms#4725)
  PRO-6576 fix default values for object fields in widgets and generally unify newInstance implementations (apostrophecms#4722)
  release 4.7.0 (apostrophecms#4717)
  allows to render widgets in published mode (for non localized with pu… (apostrophecms#4709)
  fix subfield imports (it was a bug in fetchRelationships: false) (apostrophecms#4715)
  Add replaces configuration for editor context menus (apostrophecms#4714)
  bump uploadfs dep (apostrophecms#4712)
  add batch operations to pages (apostrophecms#4684)
  PRO-6477 undhandled promise errors (apostrophecms#4700)
  fix slat order (apostrophecms#4710)
  make apostoggle accessible (apostrophecms#4708)
  Improve context menu positions (apostrophecms#4706)
  remove focus blockers in page relationship editor (apostrophecms#4702)
  Release 4.6.1 mergeback (apostrophecms#4703)
  remove z-index bump on area schema fields, boost menu index (apostrophecms#4699)
  Pro 6345 fix deprecated sass (apostrophecms#4640)
  Keep widget focused when menu is open (apostrophecms#4695)
  skipReplace for changeDocIds (apostrophecms#4694)
  ...
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.

3 participants