InseeFr / InseeFr/Pogues

Review the drag and drop filter handling specification

Open
#514 1 comment 0 reactions 1 assignee Claimed by @romaintailhurat View on GitHub
Area: Refonte P3
Dominant language
JavaScript
Stars
23
Forks
19
Avg merge
19h 49m
Merged PRs (30d)
14

Description

When a component is moved via drag and drop in the questionnaire view, the specification for handling filters is the following:

a. if the component is not a member of any filter, do nothing
b. if the component is the first and last member, delete the filter
c. if the component is the first member, replace it by the next element sharing its type (anywhere in the questionnaire)
d.if the component is the last member, replace it by the preceding element sharing its type (anywhere in the questionnaire)

I falsely identified the case b. as a bug (see the [archived issue](https://github.com/InseeFr/Pogues/issues/513)).

Nonetheless, it appears quite brutal.

To smooth things a bit, we may propose an alternative behavior, vaguely outlined by:

- let the filter in place, whatever the target location
- if the filter is nonsensical (eg the condition question is inside the filter block), we may alert the designer, and tag the filter as deactivated (and thus we won't propagate it when sending the payload for generation)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.