Skip to content

#1840: API structure improvement: expose columns through a technical name/slug/alias#2428

Open
samin-z wants to merge 7 commits into
mainfrom
feature/1840-expose-columns
Open

#1840: API structure improvement: expose columns through a technical name/slug/alias#2428
samin-z wants to merge 7 commits into
mainfrom
feature/1840-expose-columns

Conversation

@samin-z
Copy link
Copy Markdown
Contributor

@samin-z samin-z commented Mar 30, 2026

Feature ticket: #1840

New response structure:

data: [
    {
        columnId: 70,
        value: 11
    },
    {
        columnId: 72,
        value: 3
    },
    {
        columnId: 76,
        value: [
            {
                id: user1,
                type: 0,
                displayName: user1
            }
        ]
    }
],
dataByAlias: {
    column_70: {
        columnId: 70,
        value: 11
    },
    column_72: {
        columnId: 72,
        value: 3
    },
    test_customer: {
        columnId: 76,
        value: [
            {
                id: user1,
                type: 0,
                displayName: user1
            }
        ]
    }
}

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.
Screenshot 2026-03-30 at 15 13 32

@blizzz blizzz added enhancement New feature or request 3. to review Waiting for reviews labels Apr 2, 2026
@samin-z samin-z force-pushed the feature/1840-expose-columns branch from 8607112 to 5e0e8bc Compare April 7, 2026 09:19
@samin-z samin-z marked this pull request as ready for review April 10, 2026 15:30
@samin-z samin-z requested review from blizzz and enjeck as code owners April 10, 2026 15:30
Copy link
Copy Markdown
Contributor

@enjeck enjeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some comments

Comment thread lib/Service/RowService.php
Comment thread lib/Service/ColumnService.php
Comment thread src/modules/modals/EditColumn.vue
Comment thread src/modules/modals/EditColumn.vue Outdated
@samin-z samin-z requested a review from enjeck April 13, 2026 14:21
@benjaminfrueh benjaminfrueh self-requested a review April 21, 2026 08:00
@Koc
Copy link
Copy Markdown
Contributor

Koc commented Apr 28, 2026

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:

  1. as this technical name is some kind of "advanced" feature used mostly by developers - then I moved it under special "spoiler" in order to not to burden the UI for regular users
image
  1. as changes to this field can broke API/integrations - then I added some notice on change
image

WDYT about adding same things to your PR?

@samin-z samin-z force-pushed the feature/1840-expose-columns branch from 009fc5d to 788e780 Compare April 29, 2026 14:42
@Koc Koc mentioned this pull request Apr 29, 2026
@jancborchardt jancborchardt moved this to 🏗️ At engineering in 🖍 Design team May 5, 2026
@samin-z
Copy link
Copy Markdown
Contributor Author

samin-z commented May 5, 2026

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.

@samin-z
Copy link
Copy Markdown
Contributor Author

samin-z commented May 5, 2026

@nimishavijay

now we have advanced setting to column edit/create

does this setup align with what design had in mind or exact design for "table view"?
Screenshot 2026-05-05 at 16 27 55

Screenshot 2026-05-05 at 16 28 05

Copy link
Copy Markdown
Contributor

@enjeck enjeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some comments

Comment thread lib/Service/RowService.php
* ownership: string,
* ownerDisplayName: string|null,
* createdBy: string,
* dataByAlias: array<string, array{columnId: int, value: mixed}>,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be optional

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread lib/Service/ColumnService.php
@samin-z samin-z force-pushed the feature/1840-expose-columns branch from 7d347a8 to 87afb9e Compare May 8, 2026 14:15
samin-z added 6 commits May 8, 2026 16:54
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>
Signed-off-by: samin-z <samin.zavarkesh@gmail.com>
@samin-z samin-z force-pushed the feature/1840-expose-columns branch from 87afb9e to 5eb1c41 Compare May 8, 2026 14:58
@samin-z samin-z requested a review from enjeck May 8, 2026 15:23
Signed-off-by: samin-z <samin.zavarkesh@gmail.com>
@nimishavijay
Copy link
Copy Markdown
Member

Yes, this makes sense! would it be possible to make it collapsible and hide it by default? like the files sharing settings?

20260528-1235-01 9460221

I also realize that this is moving towards a bigger redesign of the "edit column" modal so also pinging @marcoambrosini here

@samin-z
Copy link
Copy Markdown
Contributor Author

samin-z commented May 28, 2026

@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?

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

Labels

3. to review Waiting for reviews enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants