Skip to content

Fix: support shvl on customapi dynamic list target#5081

Merged
shamoon merged 2 commits into
gethomepage:devfrom
matheusvellone:shvl-dynamic-list-target
Mar 28, 2025
Merged

Fix: support shvl on customapi dynamic list target#5081
shamoon merged 2 commits into
gethomepage:devfrom
matheusvellone:shvl-dynamic-list-target

Conversation

@matheusvellone
Copy link
Copy Markdown
Contributor

Proposed change

Support SHVL syntax on dynamic list target templating
There is no way to access nested fields on dynamic lists target field

  target: https://example.com/{subject.id}

Closes # (issue)

Type of change

  • New service widget
  • Bug fix (non-breaking change which fixes an issue)
  • New feature or enhancement (non-breaking change which adds functionality)
  • Documentation only
  • Other (please explain)

Checklist:

  • If applicable, I have added corresponding documentation changes.
  • If applicable, I have reviewed the feature / enhancement and / or service widget guidelines.
  • I have checked that all code style checks pass using pre-commit hooks and linting checks.
  • If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.

Comment thread src/widgets/customapi/component.jsx Outdated
@matheusvellone matheusvellone changed the title Enhancement: support shvl on customapi dynamic list target Fix: support shvl on customapi dynamic list target Mar 28, 2025
@matheusvellone matheusvellone force-pushed the shvl-dynamic-list-target branch from 849099e to c7a87cf Compare March 28, 2025 13:37
Copy link
Copy Markdown
Collaborator

@shamoon shamoon left a comment

Choose a reason for hiding this comment

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

Hmm, so I can see the value of this but Im a little concerned this adds complexity (maybe slows things down but lets be honest, probably not) where there doesnt need to be, for example the code as written will fail if target is null. Also this will fail if the property has a '.' in it, a rare but apparently a thing sometimes.

It's obviously not a big change, Im just trying to be careful about constantly changing / breaking things without a good reason (because we've done a fair bit of that lately)

Comment thread src/widgets/customapi/component.jsx Outdated
@matheusvellone matheusvellone force-pushed the shvl-dynamic-list-target branch from c7a87cf to 38431e8 Compare March 28, 2025 15:56
@yamek
Copy link
Copy Markdown

yamek commented Mar 28, 2025

So you are working on how to build a link

Comment thread src/widgets/customapi/component.jsx Outdated
@shamoon shamoon enabled auto-merge (squash) March 28, 2025 23:18
@shamoon shamoon disabled auto-merge March 28, 2025 23:18
@shamoon shamoon enabled auto-merge (squash) March 28, 2025 23:27
Copy link
Copy Markdown
Collaborator

@shamoon shamoon left a comment

Choose a reason for hiding this comment

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

Screenshot 2025-03-28 at 4 14 22 PM

This didn't actually work as-is, so I've fixed it as suggested.

Totally happy for you to contribute here, I would humbly suggest the best PRs are for high-value things that are requested 👍

Thanks

@shamoon shamoon merged commit ee7e8fa into gethomepage:dev Mar 28, 2025
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns. See our contributing guidelines for more details.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants