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

Allow Kanban titles to use referenced data #23538

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

Conversation

matt-rolley
Copy link
Contributor

Scope

What's changed:

  • Ability to use a referenced collections display value in the Kanban title

Potential Risks / Drawbacks

  • Could potentially add/load more related fields then required?

Review Notes / Questions

  • I've not done much reference field loading in the directus app before, so if there is a better way to do it please let me know :)
  • Any review/advice would be greatly appreciated.

Fixes #23537

Copy link

changeset-bot bot commented Sep 2, 2024

⚠️ No Changeset found

Latest commit: 891dc1b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@hanneskuettner
Copy link
Member

Hey @matt-rolley! Thank you for the PR!

I made a couple of changes, that include fixing a regression, that would not allow normal text fields to be selected anymore and simplifying the addition of the fields necessary for rendering the display template.

Copy link
Member

@connorwinston connorwinston left a comment

Choose a reason for hiding this comment

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

Few notes:

  • Fields that have relations only show up if they have a display template set, they should be selectable regardless if they have a display configured with a display template.
  • Is this supposed to add support for only M2O or also O2M, M2M, and M2A? Only M2O works for me.
  • The styling needs some work, setting the title to be user_created for users who do not have a profile picture results in the default material icon being huge.
  • When I initially switched from the table to kanban layout, the cards did not load and instead were replaced by a red error message saying it couldn't read textField of undefined. Deselecting the title field and reselecting the same field made the error go away and the cards to load. This error only showed up on the initial time the kanban was loaded so there may need to be some logic to update existing configs? Not sure about this one.

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.

Ability to use a referenced collection's value in the kanban title/text field
3 participants