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

Add support for top level groups #5027

Open
jfdarveau opened this issue Feb 10, 2024 · 4 comments
Open

Add support for top level groups #5027

jfdarveau opened this issue Feb 10, 2024 · 4 comments

Comments

@jfdarveau
Copy link

Describe the issue

Using Drag and Drop Designer, when group is top level, every group in the form are displayed as a tab. It makes it impossible to use groups without having another element first.

I'm not sure this is a bug a feature but I believe that groups should always look like groups. Is a tab is required, one can always use a tab instead.

This might be related to #1025.

Reproduction steps

Steps to reproduce the behavior:

  1. Create a form using Drag and Drop Designer
  2. Create a group and place on top
  3. Synchronize project with QField
  4. Check or add a feature

Expected behavior

Groups should look like groups no matter what.

Observed behavior

Groups are displayed as tabs.

Screenshots and GIFs

Group on top level in QGIS
2024-02-10 11 05 06

Group shown as tab in QField
Screenshot_20240210-110429

Group with another element on top level in QGIS

2024-02-10 11 07 25

Group showing properly in QField
Screenshot_20240210-110657

Desktop (please complete the following information)

  • OS: Windows 11
  • QGIS Version: 3.34.3
  • QFieldSync Version: 4.7.1

Mobile (please complete the following information)

  • Device: Pixel 7
  • OS: Android 14
  • QField version: 3.1.9 (f2829b)

Additional information

  • Problem started happening recently, didn't happen in an older version of QField: I don't know
  • Problem can be reliably reproduced, doesn't happen randomly: Yes
  • Problem happens with all files and projects, not only some files or projects: I only tested different layers in the same project but I would say "Yes"
@m-kuhn m-kuhn changed the title Top level groups are displayed in QField as tabs Add support for top level groups Feb 11, 2024
@m-kuhn
Copy link
Member

m-kuhn commented Feb 11, 2024

See also #1025 and #2044 which are also about top level elements and their interaction with tabs.
For reference, this was consciously left out of the first implementation to reduce code complexity. If someone goes forward with this, please take the potential maintenance effort into consideration.

@jfdarveau
Copy link
Author

As a workaround, I was able to add a field like the fid on top level, set its name to a whitespace and its widget type to "Hidden". Apart from having a blank space on the top, the form shows as I want to.

Hopefully, someone with the required skills will be able to figure this out. But according to the other related issues, it seems that this bug has been around for a while.

@m-kuhn
Copy link
Member

m-kuhn commented Feb 11, 2024

As a workaround, I was able to add a field like the fid on top level, set its name to a whitespace and its widget type to "Hidden". Apart from having a blank space on the top, the form shows as I want to.

It seems you don't want to see the field. Why do you need to add it (on top level)?

@jfdarveau
Copy link
Author

Exactly, it's just some kind of placeholder! I want all the useful fields to be grouped. If I don't have this dummy field on top, groups are shown as tabs. It's dirty, but it works. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants