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

feature: external link on records #3501

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Conversation

adrianthedev
Copy link
Collaborator

@adrianthedev adrianthedev commented Dec 9, 2024

Description

CleanShot 2024-12-09 at 16 08 47

class Avo::Resources::Post < Avo::BaseResource
  # Show a link to the post outside Avo
  self.external_link = -> {
    main_app.post_path(record)
  }
end

It's pretty common to want to lead a user outside of Avo to the public path of a record.
This API enables that.

Still to do:

  • tests
  • docs
  • figure out if we want to further configure second iteration
    • the label
    • the icon
    • the tooltip

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Screenshots & recording

Manual review steps

  1. Step 1
  2. Step 2

Manual reviewer: please leave a comment with output from the test if that's the case.

Copy link

codeclimate bot commented Dec 9, 2024

Code Climate has analyzed commit ee80719 and detected 0 issues on this pull request.

View more on Code Climate.

@adrianthedev
Copy link
Collaborator Author

I'm open to naming suggestions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants