#1840: API structure improvement: expose columns through a technical name/slug/alias#2428
#1840: API structure improvement: expose columns through a technical name/slug/alias#2428samin-z wants to merge 7 commits into
Conversation
8607112 to
5e0e8bc
Compare
|
hey @samin-z! Thank you so much for taking care of this. I've just opened similar PR for Views #2547. Few ideas that came to my mind when I worked on it:
WDYT about adding same things to your PR? |
009fc5d to
788e780
Compare
|
i compared playwright fails against main, failures are in known flaky datetime/login/navigation tests and are reproducible outside this branch, none of the failures point to technical_name or dataByAlias code paths. |
| * ownership: string, | ||
| * ownerDisplayName: string|null, | ||
| * createdBy: string, | ||
| * dataByAlias: array<string, array{columnId: int, value: mixed}>, |
There was a problem hiding this comment.
i'de keep it as none optional, the row serializer always returns this key and it gets normalized to an array, so clients get a stable contract anyway.
There was a problem hiding this comment.
I think this line means that every view response has a required dataByAlias field? But View::jsonSerialize() in lib/Db/View.php does not return dataByAlias. I'm confused
There was a problem hiding this comment.
dataByAlias field is always present in row api responses, the code that builds these responses ensures it regardless of technicalName. the confusion here is because View::jsonSerialize() is unrelated to row serialization. the type definition is correct and we do not need to make dataByAlias optional unless we expect future changes that could remove it.
you can check it locally and if there is a case which i missed, please let me know.
7d347a8 to
87afb9e
Compare
Signed-off-by: samin-z <samin.zavarkesh@gmail.com>
Signed-off-by: samin-z <samin.zavarkesh@gmail.com>
Signed-off-by: samin-z <samin.zavarkesh@gmail.com>
Signed-off-by: samin-z <samin.zavarkesh@gmail.com>
Signed-off-by: samin-z <samin.zavarkesh@gmail.com>
87afb9e to
5eb1c41
Compare
Signed-off-by: samin-z <samin.zavarkesh@gmail.com>
|
Yes, this makes sense! would it be possible to make it collapsible and hide it by default? like the files sharing settings?
I also realize that this is moving towards a bigger redesign of the "edit column" modal so also pinging @marcoambrosini here |
|
@nimishavijay i thought about it, but since it's a new feature it's possible users might miss it. so for better user accessibility and until users get used to it i thought to leave it out in the open and in later version to improve it, what do you think? |





Feature ticket: #1840
New response structure:
now we have new field added to columns called 'technical_name' which if user does not add it as default will be 'column_{id}', 'dataByAlias' added on top of 'data' not to break the current structure.
