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 an option to autosize all columns by default when opening an attribute table #58547

Merged

Conversation

benwirf
Copy link
Contributor

@benwirf benwirf commented Aug 31, 2024

Description

This is a re-submission of this closed PR: #57643 with the branch re-based onto a recent master branch.

This PR adds an option via a checkbox in the Data Sources tab of the Options Dialog (opened via the Settings menu) to always resize columns to contents when opening an attribute table.

This extends #41276 and addresses a more recent request posted as a comment to the original feature request.

This was also discussed in this question on GIS Stack Exchange.

Screenshot of Options Dialog showing added checkbox at top right:

Screenshot from 2024-09-15 12-40-32

Quick screencast showing added default autosize behaviour with checkbox option checked.

autosize

Copy link

github-actions bot commented Aug 31, 2024

🪟 Windows builds ready!

Windows builds of this PR are available for testing here. Debug symbols for this build are available here.

(Built from commit a67dc31)

@nyalldawson
Copy link
Collaborator

@benwirf

Can you move the checkbox down to sit on its own row? ie:

image

(and ensure that both checkboxes span all the columns in that layout too)

@nyalldawson nyalldawson added Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. Changelog Items that are queued to appear in the visual changelog - remove after harvesting labels Sep 1, 2024
@qgis-bot
Copy link
Collaborator

qgis-bot commented Sep 1, 2024

@benwirf
This pull request has been tagged as requiring documentation.

A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged.

Please update the description (not the comments) with helpful description and screenshot to help the work from documentors.
Also, any commit having [needs-doc] or [Needs Documentation] in will see its message pushed to the issue, so please be as verbose as you can.

Thank you!

@qgis-bot
Copy link
Collaborator

qgis-bot commented Sep 1, 2024

@benwirf

This pull request has been tagged for the changelog.

  • The description will be harvested so please provide a "nearly-ready" text for the final changelog
  • If possible, add a nice illustration of the feature. Only the first one in the description will be harvested (GIF accepted as well)
  • If you can, it's better to give credits to your sponsor, see below for different formats.

You can edit the description.

Format available for credits
  • Funded by NAME
  • Funded by URL
  • Funded by NAME URL
  • Sponsored by NAME
  • Sponsored by URL
  • Sponsored by NAME URL

Thank you!

@benwirf
Copy link
Contributor Author

benwirf commented Sep 2, 2024

@nyalldawson, no worries- I can definitely make that change. I will have some time to work on this tomorrow & I will push the changes to this branch when done.
Thanks for the feedback.

@benwirf benwirf force-pushed the autosize-attribute-table-default-option branch from 37bbdb3 to c49c635 Compare September 8, 2024 07:52
@benwirf
Copy link
Contributor Author

benwirf commented Sep 8, 2024

@nyalldawson, @3nids, I have made the requested changes. Hopefully my approach is OK with the settings API.

@nyalldawson nyalldawson added the Freeze Exempt Feature Freeze exemption granted label Sep 13, 2024
@benwirf benwirf force-pushed the autosize-attribute-table-default-option branch from c49c635 to a67dc31 Compare September 14, 2024 11:33
@benwirf
Copy link
Contributor Author

benwirf commented Sep 15, 2024

Screenshot of qgsoptionsbase.ui (design mode) showing new checkbox moved to its own row and both checkboxes spanning all columns in the layout.

Screenshot from 2024-09-15 12-33-07

@nyalldawson nyalldawson merged commit 98905ef into qgis:master Sep 16, 2024
29 checks passed
@qgis-bot
Copy link
Collaborator

@benwirf
A documentation ticket has been opened at qgis/QGIS-Documentation#9266
It is your responsibility to visit this ticket and add as much detail as possible for the documentation team to correctly document this change.
Thank you!

@benwirf
Copy link
Contributor Author

benwirf commented Sep 17, 2024

Thank you @nyalldawson :-)

@zacharlie zacharlie added ChangelogHarvested This PR description has been harvested in the Changelog already. and removed Changelog Items that are queued to appear in the visual changelog - remove after harvesting labels Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ChangelogHarvested This PR description has been harvested in the Changelog already. Freeze Exempt Feature Freeze exemption granted Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants