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

Added configurable List Table Column character limits #143

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tomsb
Copy link
Contributor

@tomsb tomsb commented Nov 26, 2024

Extending the controller would be easy, but I feel that's overkill for this functionality.
What do you think?

@pxpm
Copy link
Contributor

pxpm commented Nov 27, 2024

Hey @tomsb thanks for the PR.

I think in this case extending the Controller is the right approach. In no time you will want another attribute, then someone wants other, and we will have created a bunch of configs for field attributes.

Most of the time, if not every time, you would want to add new settings etc.

One thing we could think about is to make this package publish a class, like SettingsControllerDefinitions with the defaults (fields, columns etc) defined, and you can just change/add/remove the settings fields there.

The pro is that the SettingsCrud in this package would read that class to define the fields/columns, so you don't need to overwrite the controller and bind your new controller.
The downside is that is a "different" way of doing things and it might look weird and overcomplicating something that's "easy" to do.

I am tempted to say that just overwriting the controller give you much more flexibility, plus it will look and feel like other backpack crud controllers.

What do you think ?

Cheers

@tomsb
Copy link
Contributor Author

tomsb commented Nov 27, 2024

Makes sense to just overwrite the controller. My main issue with it is that the default limit of only 32 characters for the description column isn't sensible - it's too short for a description. This could be hardcoded directly into the column definition?

Also, the LV translation somehow ended up in this PR - apologies for that.

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.

2 participants