PIM-3196 Refactor the view element feature

| Q                    | A
| -------------------- | ---
| Bug fix?             | N
| New feature?         | N
| BC breaks?           | N
| CI currently passes? | ?
| Tests pass?          | Y
| Scenarios pass?      | ?
| Checkstyle issues?*  | N
| PMD issues?**        | N
| Changelog updated?   | N
| Fixed tickets        | ~
| DB schema updated?   | N
| Migration script?    | N
| Doc PR               | ~
ok, good to me