-
Notifications
You must be signed in to change notification settings - Fork 2.3k
feat: hide fields in version view + admin.hiddenInVersionView
#7724
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
base: main
Are you sure you want to change the base?
feat: hide fields in version view + admin.hiddenInVersionView
#7724
Conversation
4e05e23
to
2dd7b56
Compare
@zubricks any chance of getting some feedback on this one? We are going to need it in v3 as well. |
@franciscolourenco I'm wondering if admin: {
hidden: {
versions: true
}
}
The keyword |
@jacobsfletch I think that would be a pretty good API, but.. wouldn't it be sort of a breaking change, or at least hard to explain why This is the current state of the API afaict: hidden: true // hidden everywhere including APIs
admin: {
hidden: true, // hidden in edit view (and bulk edit)
disabled: true, // hidden in all views
disableBulkEdit: true, // hidden in bulk edit select
disableListColumn: true, // hidden in the list view table
disableListFilter: true, // hidden in the filters
} I settled with Any other ideas? |
Yea this would be a breaking change, but should definitely implement it in v4. If you set admin: {
hidden: true // hides this field from _all_ views in the admin panel
} admin: {
hidden: {
field: true, // hides this field from the edit view only
filter: true, // hides from list view filter controls
column: true, // hides from list view column selector
diff: true // hides the diff from the versions view
}
}
Yep, this is pretty much the same scenario. IMO a boolean or object would also have been a better choice for |
This doesn't seem to be the case now, which I found unexpected, and why I suggested renaming it to
Unless this is a bug, and the intention was for |
admin.hiddenInVersionView
admin.hiddenInVersionView
2dd7b56
to
da3aa28
Compare
@jacobsfletch I've ported the changes to v3 and force pushed to this branch, so the v2 label can be removed. This is ready to review from my point of view. To consider:
|
da3aa28
to
6ad1126
Compare
6ad1126
to
9ad5c44
Compare
BREAKING CHANGE: some users might have come to expect these fields to be displayed in the version view, but it doesn't seem to make sense
fe539aa
to
48f493b
Compare
I've updated the PR to take into consideration the changes introduced by #8054 and it is ready to be reviewed. If you are concerned about hiding |
admin.hiddenInVersionView
admin.disableVersionView
fcf639f
to
4544268
Compare
admin.disableVersionView
admin.hiddenInVersionView
@franciscolourenco I am confused as to why we need a specific variable for the versions view. I feel as if a field has @jacobsfletch wdyt? |
@JarrodMFlesch I think the point of |
Description
hidden
andadmin.disabled
from the version view.admin.hiddenInVersionView
.I've considered other names for the new option:
admin.disabledInVersionView
;admin.disableVersionView
.admin.disableInVersionView
follows the pattern ofadmin.disableListColumn
andadmin.disableListFiler
. However, it could be confused with a disabled state of an input, so I ended up going withhiddenInVersionView
because it is more precise, and follows the pattern ofadmin.hidden
, but I'm open to other ideas and preferences on the naming.Speaking of
admin.hidden
, we should probably consider renaming this option to something likeadmin.hiddenInEditView
, since it can be easily confused with thehidden
option that most fields also have. The first, only hides a field from the edit view, while the later hides a field everywhere, including the API.Type of change
Checklist: