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

Make links in panels clickable #11774

Merged
merged 2 commits into from
Jan 30, 2024
Merged

Make links in panels clickable #11774

merged 2 commits into from
Jan 30, 2024

Conversation

urimandujano
Copy link
Contributor

@urimandujano urimandujano commented Jan 30, 2024

When we print the output of a served flow/deployment, we present the user a link that will send them to the UI where they can interact with their served process. The link is unclickable and un-copy-pasteable today because the rich's wrapping and Panel presentation don't mix well together. This PR removes the Panel on outputs that contain links and gets us a wrapped, clickable, copy-pasteable link.

Example

Before:

╰─❯ python simple.py
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Your deployments are being served and polling for scheduled runs!                                              │
│                                                                                                                │
│         Deployments                                                                                            │
│ ┌─────────────────────────┐                                                                                    │
│ │ my-sub-flow/my_sub_flow │                                                                                    │
│ └─────────────────────────┘                                                                                    │
│                                                                                                                │
│ To trigger any of these deployments, use the following command:                                                │
│                                                                                                                │
│         $ prefect deployment run [DEPLOYMENT_NAME]                                                             │
│                                                                                                                │
│ You can also trigger your deployments via the Prefect UI:                                                      │
│ https://app.prefect.cloud/account/22a9d00f-2f5a-408d-991e-4f287f3dfdd9/workspace/80cd5327-831d-4a53-9683-407b6 │
│ c552596/deployments                                                                                            │
│                                                                                                                │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

After:

╰─❯ python simple.py
Your deployments are being served and polling for scheduled runs!

        Deployments
┌─────────────────────────┐
│ my-sub-flow/my_sub_flow │
└─────────────────────────┘

To trigger any of these deployments, use the following command:

        $ prefect deployment run [DEPLOYMENT_NAME]

You can also trigger your deployments via the Prefect UI: https://app.prefect.cloud/account/22a9d00f-2f5a-408d-991e-4f287f3dfdd9/workspace/80cd5327-831d-4a53-9683-407b6c552596/deployments

Checklist

  • This pull request references any related issue by including "closes <link to issue>"
    • If no issue exists and your change is not a small fix, please create an issue first.
  • This pull request includes tests or only affects documentation.
  • This pull request includes a label categorizing the change e.g. maintenance, fix, feature, enhancement, docs.

For documentation changes:

  • This pull request includes redirect settings in netlify.toml for files that are removed or renamed.

For new functions or classes in the Python SDK:

  • This pull request includes helpful docstrings.
  • If a new Python file was added, this pull request contains a stub page in the Python SDK docs and an entry in mkdocs.yml navigation.

Copy link

netlify bot commented Jan 30, 2024

Deploy Preview for prefect-docs-preview ready!

Name Link
🔨 Latest commit 24486a7
🔍 Latest deploy log https://app.netlify.com/sites/prefect-docs-preview/deploys/65b942d2cc3f630008b205e2
😎 Deploy Preview https://deploy-preview-11774--prefect-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@abrookins abrookins left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Tested in Terminal and iTerm on macOS.

@urimandujano urimandujano changed the title ft: dont use panels with links Make links in panels clickable Jan 30, 2024
@urimandujano urimandujano added the fix A fix for a bug in an existing feature label Jan 30, 2024
@urimandujano urimandujano marked this pull request as ready for review January 30, 2024 19:31
@urimandujano urimandujano requested a review from a team as a code owner January 30, 2024 19:31
@urimandujano urimandujano merged commit 0153444 into main Jan 30, 2024
61 checks passed
@urimandujano urimandujano deleted the fix/use-clickable-links branch January 30, 2024 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix A fix for a bug in an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants