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

Refactor editing ux #110

Draft
wants to merge 85 commits into
base: newsetup
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
98c787a
Update Brazilian Portuguese translations (#114)
ericof Sep 12, 2024
9dd726f
fix: Fix bug that form data can not be loaded for forms in accordions…
mbarde Sep 12, 2024
eb259a0
fix: reset otp on formdata reset (#116)
giuliaghisini Sep 12, 2024
7b945a8
chore: release v3.9.3
giuliaghisini Sep 12, 2024
9cda160
feat: email otp validation switchable per form (#119)
giuliaghisini Oct 2, 2024
afe2d11
chore: release v3.10.0
giuliaghisini Oct 2, 2024
3cdb14d
fix: always set static_text fields as not required
pnicolli Oct 3, 2024
caec8f9
chore: release v3.10.1
pnicolli Oct 3, 2024
fa124f7
New setup in place
sneridagh Jul 4, 2024
cb329d4
ESlint fixes and i18n
sneridagh Jul 4, 2024
75bac7e
Cypress example at least
sneridagh Jul 4, 2024
cade68d
Changelog
sneridagh Jul 4, 2024
a0fae84
Update package.json
sneridagh Jul 8, 2024
ea686e3
Remove dangling old package
sneridagh Jul 8, 2024
0a6f9ce
First unified version
sneridagh Jul 8, 2024
87cd861
Fix lint
sneridagh Jul 8, 2024
98a5096
Move backend CI from the addon
sneridagh Jul 9, 2024
b3433d9
Default dir
sneridagh Jul 9, 2024
2b48f75
Back to the old gha
sneridagh Jul 9, 2024
75ca67c
Use hatch
sneridagh Jul 11, 2024
1307e93
Fix some linting
sneridagh Jul 11, 2024
64c365a
Remove pre-commit
sneridagh Jul 11, 2024
3e52f8b
Fix linting errors
ericof Jul 15, 2024
214a9fd
Small fix on .editorconfig
ericof Jul 15, 2024
8ee64f5
Refactor tests
ericof Jul 15, 2024
ffb2759
Fix Docker image creation
ericof Jul 15, 2024
8a78b6e
Remove lingering files
sneridagh Jul 16, 2024
50b7ddc
Bring back docs folder
sneridagh Jul 16, 2024
cbcd545
Fix dependencies, remove pre-commit
ericof Jul 16, 2024
0dc681c
WIP
sneridagh Jul 26, 2024
7105fae
fixes
davisagli Aug 22, 2024
5c7b293
organize fieldsets better
davisagli Aug 26, 2024
0c6d955
fix FormDataStore for schemaForm
davisagli Aug 26, 2024
bbe25f0
server-side schema validation
davisagli Aug 26, 2024
8583e73
fix tests
davisagli Sep 10, 2024
151e144
Rearrange sidebar schema fields.
robgietema Sep 11, 2024
d4f245d
Set default values based on querystring.
robgietema Sep 11, 2024
3222d79
Add hidden field.
robgietema Sep 12, 2024
5dce485
Add static text field.
robgietema Sep 19, 2024
47c81d8
Rename service to schemaform-data to avoid colliding with old block
davisagli Sep 19, 2024
50ef79b
Refactor form processing into multiple processor subscribers
davisagli Sep 19, 2024
d8cc29f
Make captcha optional to facilitate testing
davisagli Sep 19, 2024
67c910e
fix handling of form data
davisagli Sep 20, 2024
f5b6ae9
progress on new email processor
davisagli Sep 23, 2024
0a192bd
Handle attachments
davisagli Sep 24, 2024
39f685c
Add confirmation email
davisagli Sep 24, 2024
99bd436
include sender name in email headers
davisagli Sep 24, 2024
46b4d0f
Set default fields.
robgietema Sep 30, 2024
45fcc6d
Render title and description.
robgietema Sep 30, 2024
1c634c8
get email template from registry
davisagli Oct 2, 2024
7e26e1b
Fix enter bug.
robgietema Oct 5, 2024
d765143
Filter data to be send.
robgietema Oct 5, 2024
94d4922
Fix translations.
robgietema Oct 5, 2024
98ed43d
Move captcha field to the end.
robgietema Oct 5, 2024
2d02233
Add thank you page.
robgietema Oct 5, 2024
e23e727
Add translations.
robgietema Oct 16, 2024
08d5b6c
Set text buttons.
robgietema Oct 16, 2024
4187e54
Add fields to thank you page.
robgietema Oct 29, 2024
2074115
Add email sender.
robgietema Oct 30, 2024
5900031
Fix thank you functionality.
robgietema Oct 30, 2024
e3482e3
Change labels.
robgietema Oct 30, 2024
216adfe
Add fixed attachment.
robgietema Oct 30, 2024
48b841d
Add translations.
robgietema Oct 30, 2024
808899f
Fix linting.
robgietema Nov 5, 2024
7982b4f
Add custom widgets wrappers.
robgietema Nov 13, 2024
6cd40a3
Add wrappers for custom forms.
robgietema Nov 18, 2024
cc05f56
Fix description styling.
robgietema Nov 25, 2024
3de4d74
Add default value to select box.
robgietema Nov 25, 2024
6a07150
Email and number widget fixes.
robgietema Nov 25, 2024
5e49edb
Update custom wrappers.
robgietema Nov 28, 2024
63e2c5f
Fix checkbox group.
robgietema Nov 30, 2024
5a413ae
Fix fieldset.
robgietema Dec 3, 2024
3bfd962
don't return attachments in the response after posting
davisagli Dec 5, 2024
71754f9
lint
davisagli Dec 5, 2024
510268e
Fix file widget in thank you page.
robgietema Dec 14, 2024
feddf65
Fix datetime wrapper values.
robgietema Dec 15, 2024
477f020
Add mail_templates vocabulary.
robgietema Dec 17, 2024
db614fa
Add mail_templates setting.
robgietema Dec 17, 2024
cb8695f
Fix required translation.
robgietema Dec 17, 2024
6fa401c
Add translations.
robgietema Dec 17, 2024
c9cd171
Fix clear date input.
robgietema Dec 17, 2024
e872328
Fix required for field wrappers.
robgietema Dec 17, 2024
1a499db
Support html in thank you page.
robgietema Dec 19, 2024
4944c2d
Fix placeholder for checkboxgroup.
robgietema Jan 14, 2025
b5fd610
Fix field types for number and time fields.
robgietema Jan 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .editorConfig

This file was deleted.

35 changes: 35 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

# EditorConfig Configurtaion file, for more details see:
# https://EditorConfig.org
# EditorConfig is a convention description, that could be interpreted
# by multiple editors to enforce common coding conventions for specific
# file types

# top-most EditorConfig file:
# Will ignore other EditorConfig files in Home directory or upper tree level.
root = true


[*] # For All Files
# Unix-style newlines with a newline ending every file
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
# Set default charset
charset = utf-8
# Indent style default
indent_style = space

[*.{py,cfg,ini}]
# 4 space indentation
indent_size = 4

[*.{html,dtml,pt,zpt,xml,zcml,js,json,ts,less,css,sass,scss,yml,yaml}]
# 2 space indentation
indent_size = 2

[{Makefile,.gitmodules}]
# Tab indentation (no size specified, but view as 4 spaces)
indent_style = tab
indent_size = unset
tab_width = unset
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

45 changes: 0 additions & 45 deletions .eslintrc.js

This file was deleted.

141 changes: 141 additions & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
name: Backend CI

on:
workflow_call:
workflow_dispatch:

env:
IMAGE_NAME_PREFIX: ghcr.io/collective/volto-form-block
IMAGE_NAME_SUFFIX: backend
PYTHON_VERSION: "3.11"

defaults:
run:
working-directory: ./backend

jobs:

config:
runs-on: ubuntu-latest
outputs:
BASE_TAG: ${{ steps.vars.outputs.BASE_TAG }}
PLONE_VERSION: ${{ steps.vars.outputs.PLONE_VERSION }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set Env Vars
id: vars
run: |
echo "PLONE_VERSION=$(cat version.txt)" >> $GITHUB_OUTPUT
echo 'BASE_TAG=sha-'$(git rev-parse --short HEAD) >> $GITHUB_OUTPUT

- name: Test vars
run: |
echo 'BASE_TAG=${{ steps.vars.outputs.BASE_TAG }}'
echo 'PLONE_VERSION=${{ steps.vars.outputs.PLONE_VERSION }}'

code-quality:
runs-on: ubuntu-latest
needs:
- config
steps:
- name: Checkout codebase
uses: actions/checkout@v4

- name: Install hatch
run: pipx install hatch

- name: Generate Constraints file
run: pipx run mxdev -c mx.ini

- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'

- name: "Install Environment"
run: hatch env create

- name: "Run checks"
run: hatch run lint

test:
runs-on: ubuntu-latest
needs:
- config
steps:
- name: Checkout codebase
uses: actions/checkout@v4

- name: Install hatch
run: pipx install hatch

- name: Generate Constraints file
run: pipx run mxdev -c mx.ini

- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'

- name: "Install Environment"
run: hatch env create

- name: "Test Codebase"
run: hatch run test

release:
runs-on: ubuntu-latest
needs:
- config
- code-quality
- test
permissions:
contents: read
packages: write

steps:

- name: Checkout
uses: actions/checkout@v4

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.IMAGE_NAME_PREFIX }}-${{ env.IMAGE_NAME_SUFFIX }}
labels: |
org.label-schema.docker.cmd=docker run -d -p 8080:8080 ${{ env.IMAGE_NAME_PREFIX }}-${{ env.IMAGE_NAME_SUFFIX }}:latest
flavor:
latest=false
tags: |
type=ref,event=branch
type=sha
type=raw,value=latest,enable={{is_default_branch}}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
context: backend
file: backend/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
PLONE_VERSION=${{ needs.config.outputs.PLONE_VERSION }}
140 changes: 140 additions & 0 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
name: Frontend CI

on:
workflow_call:
workflow_dispatch:

env:
IMAGE_NAME_PREFIX: ghcr.io/collective/volto-form-block
IMAGE_NAME_SUFFIX: frontend
NODE_VERSION: 20.x

defaults:
run:
working-directory: ./frontend

jobs:
meta:
runs-on: ubuntu-latest
outputs:
BASE_TAG: ${{ steps.vars.outputs.BASE_TAG }}
VOLTO_VERSION: ${{ steps.vars.outputs.VOLTO_VERSION }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Compute several vars needed for the build
id: vars
run: |
echo 'BASE_TAG=sha-$(git rev-parse --short HEAD)' >> $GITHUB_OUTPUT
python3 -c 'import json; data = json.load(open("./mrs.developer.json")); print("VOLTO_VERSION=" + data["core"].get("tag") or data["core"].get("branch") or "latest")' >> $GITHUB_OUTPUT
- name: Test vars
run: |
echo 'BASE_TAG=${{ steps.vars.outputs.BASE_TAG }}'
echo 'VOLTO_VERSION=${{ steps.vars.outputs.VOLTO_VERSION }}'

code-analysis:
runs-on: ubuntu-latest
steps:
- name: Checkout codebase
uses: actions/checkout@v4

- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: make install

- name: Linting
id: lint
if: ${{ success() || failure() }}
run: make lint

- name: i18n sync
id: i18n
if: ${{ success() || failure() }}
run: make ci-i18n

- name: Unit Tests
id: unit
if: ${{ success() || failure() }}
run: make test

- name: Report
if: ${{ success() || failure() }}
run: |
echo '# Code Analysis' >> $GITHUB_STEP_SUMMARY
echo '| Test | Status |' >> $GITHUB_STEP_SUMMARY
echo '| --- | --- |' >> $GITHUB_STEP_SUMMARY
echo '| Lint | ${{ steps.lint.conclusion == 'failure' && '❌' || ' ✅' }} |' >> $GITHUB_STEP_SUMMARY
echo '| i18n | ${{ steps.i18n.conclusion == 'failure' && '❌' || ' ✅' }} |' >> $GITHUB_STEP_SUMMARY
echo '| Unit Tests | ${{ steps.unit.conclusion == 'failure' && '❌' || ' ✅' }} |' >> $GITHUB_STEP_SUMMARY

release:
runs-on: ubuntu-latest
needs:
- meta
- code-analysis
permissions:
contents: read
packages: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.IMAGE_NAME_PREFIX }}-${{ env.IMAGE_NAME_SUFFIX }}
labels: |
org.label-schema.docker.cmd=docker run -d -p 3000:3000 ${{ env.IMAGE_NAME_PREFIX }}-${{ env.IMAGE_NAME_SUFFIX }}:latest
flavor: latest=false
tags: |
type=ref,event=branch
type=sha
type=raw,value=latest,enable={{is_default_branch}}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
context: frontend/
file: frontend/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VOLTO_VERSION=${{ needs.meta.outputs.VOLTO_VERSION }}
Loading
Loading