Skip to content

fix(relations): Fix relations loading in applications, references, analytics - #2923

Open
Koc wants to merge 3 commits into
mainfrom
bugfix/fix-relations-loading-in-applications
Open

fix(relations): Fix relations loading in applications, references, analytics#2923
Koc wants to merge 3 commits into
mainfrom
bugfix/fix-relations-loading-in-applications

Conversation

@Koc

@Koc Koc commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

This PR fixes 5 errors related to relation column type. Closes #2858, Closes #2915

🖼️ Screenshots

🏚️ Before 🏡 After
image image
image image
image image
image image
image image

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔙 Backport requests are created or not needed: /backport to stableX.X
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@Koc
Koc force-pushed the bugfix/fix-relations-loading-in-applications branch from 632226a to 9250ea8 Compare August 28, 2026 00:18
@Koc Koc changed the title fix(relations): Fix relations loading in applications fix(relations): Fix relations loading in applications and references Aug 28, 2026
@Koc
Koc force-pushed the bugfix/fix-relations-loading-in-applications branch 2 times, most recently from 98ef0e8 to a59929b Compare August 28, 2026 08:52
@Koc
Koc marked this pull request as ready for review August 28, 2026 23:42
@Koc
Koc requested review from blizzz and enjeck as code owners August 28, 2026 23:42
Comment on lines 60 to 68
relationOptions() {
const dataStore = useDataStore()
const activeElement = this.activeView || this.activeTable
if (activeElement) {
const columnRelations = dataStore.getRelations(this.column.id)
return Object.values(columnRelations)
}
return []
},

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.

This leaves the write path with the same bug this PR removes from RelationColumn.getLabel() ?

Comment on lines 52 to 58
loading() {
const dataStore = useDataStore()
const activeElement = this.activeView || this.activeTable
if (activeElement) {
return dataStore.getRelationsLoading(!!this.activeView, activeElement.id)
}
return false

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.

In an application context , neither activeTable nor activeView is ever set, so activeElement is undefined. In a context this always returns false, so the picker never shows a loading state?

Comment on lines 78 to 87
async mounted() {
const activeElement = this.activeView || this.activeTable
if (activeElement) {
await this.loadRelationsFromBE({
tableId: this.activeTable?.id,
viewId: this.activeView?.id,
force: true,
})
}
},

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.

Because activeElement is null in a context, this mounted load is skipped there. Should we load from the column's tableId

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.

onSharePermissions can be null, so let's optionally chain these? And others below

@Koc
Koc force-pushed the bugfix/fix-relations-loading-in-applications branch from 0d9053e to 9b6b0ca Compare August 30, 2026 12:15
Koc added 2 commits August 30, 2026 15:21
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
@Koc
Koc force-pushed the bugfix/fix-relations-loading-in-applications branch from a970578 to cfe987b Compare August 30, 2026 13:21
@Koc

Koc commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

@enjeck I did the rebase, fixed conflicts introduced by #2868, fixed your comments. Also manually tested some basic scenarios that covers current PR, works fine (including row editing/creation inline/via popup). Please check one more time

@Koc
Koc requested a review from enjeck August 30, 2026 13:35
@Koc Koc changed the title fix(relations): Fix relations loading in applications and references fix(relations): Fix relations loading in applications, references, analytics Aug 30, 2026
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
@Koc
Koc force-pushed the bugfix/fix-relations-loading-in-applications branch from eee9360 to b9cecdd Compare August 30, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants