Skip to content

feat: new form-builder#1437

Merged
PelaFad merged 3 commits into
alpha/editor-featurefrom
pelafad/form-builder
May 4, 2026
Merged

feat: new form-builder#1437
PelaFad merged 3 commits into
alpha/editor-featurefrom
pelafad/form-builder

Conversation

@PelaFad
Copy link
Copy Markdown

@PelaFad PelaFad commented Apr 28, 2026

No description provided.

@gravity-ui-bot
Copy link
Copy Markdown
Contributor

Preview is ready.

@DaffPunks
Copy link
Copy Markdown
Collaborator

DaffPunks commented Apr 28, 2026

image

It's a cool behavior that if a form has a condition, it's marked as "Hidden by condition," but if it's hidden, the fields become unclickable.

Or maybe we should do this:

Mark it with the "Visibility by condition" label, always, if there are any conditions.
Remove the "Hidden by condition" label.
Make the fields clickable even if they're "Hidden by condition."
Why? I'm building my form in the editor and don't plan to test it yet. In other words, I want to create a structure and want nothing to get in the way. Only then will I switch to the Preview tab and test it.


Классное поведение, что если в форме есть условие, то помечать его как "Hidden by condition", но если он hidden, то поля некликабельные становятся.

А может сделаем так:

  1. Помечаем лейблом "Visibility by condition", причем всегда, если есть условия хоть какие-то
  2. Убираем лейбл "Hidden by condition"
  3. Даем кликать на поля даже если "Hidden by condition"

Почему? Я в редакторе собираю свою форму и пока что не собираюсь ее тестировать. Другими словами я хочу собрать структуру и хочу чтобы мне ничего не мешало. И только потом я перейду на вкладку Preview и потестирую

@DaffPunks
Copy link
Copy Markdown
Collaborator

image

Missed gap here. I assume it's due to the lack of a drag section.

@DaffPunks
Copy link
Copy Markdown
Collaborator

Can we change layout from this:

image

To this?

image

@DaffPunks
Copy link
Copy Markdown
Collaborator

Is it possible to add functionality for inserting an existing config?

Something like I insert my JSON and the form takes on the appearance of my config.

image

In other words, you need not only a Copy schema, but also a Paste Schema.


#{$block} {
position: relative;
padding: 12px 14px;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why we dont use variables ?

className: string;
}

const SectionChildrenDropZone: React.FC<SectionChildrenDropZoneProps> = ({
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

create /components folder and create put all sub components into this folder, because this file is unnecessarily large

display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
gap: 16px;
margin-top: 16px;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

indent variables too

/>
) : (
<Text variant="body-2" color="hint">
Add fields on the Visual tab to see the form here.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why we dont use i18n ?

Copy link
Copy Markdown
Collaborator

@DaffPunks DaffPunks Apr 28, 2026

Choose a reason for hiding this comment

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

Let's add i18n later. It's not available right now. Everything is in English for now

Copy link
Copy Markdown
Collaborator

@NikitaCG NikitaCG May 4, 2026

Choose a reason for hiding this comment

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

ok, but create issue for this

onChange: (next: When | undefined) => void;
}

const parse = (when: When | undefined): {conditions: Condition[]; combinators: Combinator[]} => {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

all utils func in utils file

Copy link
Copy Markdown
Collaborator

@NikitaCG NikitaCG left a comment

Choose a reason for hiding this comment

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

check my comments in all files please

@PelaFad PelaFad changed the title feat: new form-builder feat: new form-builder[WIP] Apr 29, 2026
@PelaFad PelaFad changed the title feat: new form-builder[WIP] feat: new form-builder Apr 30, 2026
@PelaFad PelaFad merged commit 261529b into alpha/editor-feature May 4, 2026
1 of 3 checks passed
@PelaFad PelaFad deleted the pelafad/form-builder branch May 4, 2026 08:54
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.

4 participants