Skip to content

Copying DAG ID from UI and pasting in Slack includes schedule #22320

Closed

Description

@alexbegg

Apache Airflow version

2.2.3

What happened

(Yes, I know the title says Slack and it might not seem like an Airflow issue, but so far this is the only application I noticed this on. There might be others.)

PR #11503 was a fix to issue #11500 to prevent text-selection of scheduler interval when selecting DAG ID. However it does not fix pasting the text into certain applications (such as Slack), at least on a Mac.

@ryanahamilton thanks for the fix, but this is fixed in the visible sense (double clicking the DAG ID to select it will now not show the schedule interval and next run as selected in the UI), however if you copy what is selected for some reason it still includes schedule interval and next run when pasted into certain applications.

I can't be sure why this is happening, but certain places such as pasting into Google Chrome, TextEdit, or Visual Studio Code it will only include the DAG ID and a new line. But other applications such as Slack (so far only one I can tell) it includes the schedule interval and next run, as you can see below:

  • Schedule interval and next run not shown as selected on the DAG page:
    Screen Shot 2022-03-16 at 11 04 21 AM
  • Schedule interval and next run not pasted in Google Chrome and TextEdit:
    Screen Shot 2022-03-16 at 11 05 10 AM
    Screen Shot 2022-03-16 at 11 15 14 AM
  • Schedule interval and next run pasted and visible in Slack:
    Screen Shot 2022-03-16 at 11 05 40 AM

What you think should happen instead

When you select the DAG ID on the DAG page, copy what is selected, and then paste into a Slack message, only the DAG ID should be pasted.

How to reproduce

Select the DAG ID on the DAG page (such as double-clicking the DAG ID), copy what is selected, and then paste into a Slack message.

Operating System

macOS 1.15.7 (Catalina)

Versions of Apache Airflow Providers

No response

Deployment

Astronomer

Deployment details

No response

Anything else

This is something that possibly could be a Slack bug (one could say that Slack should strip out anything that is user-select: none), however it should be possible to fix the HTML layout so user-select: none is not even needed to prevent selection. It is sort of a band-aid fix.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. eladkal commented on Mar 16, 2022

    @eladkal
    Contributor

    I can confirm this indeed happens with paste ( CMD + V)
    However if you will paste with CMD + SHIFT + V - it will behave as you expect

  2. alexbegg commented on Mar 16, 2022

    @alexbegg
    ContributorAuthor

    I can confirm this indeed happens with paste ( CMD + V)

    However if you will paste with CMD + SHIFT + V - it will behave as you expect

    Good catch on the CMD + SHIFT + V, I do that sometimes when I didn't want to paste HTML. I'll keep that in mind.

    It will be nice though if selecting the text just selects that DAG ID and not the other stuff.

  3. added
    area:UIRelated to UI/UX. For Frontend Developers.
    and removed on Mar 18, 2022
  4. potiuk commented on Mar 21, 2022

    @potiuk
    Member

    Change it into feature. And yeah feel free to work on it @alexbegg :)

  5. vchiapaikeo commented on Dec 29, 2022

    @vchiapaikeo
    Contributor

    Is anyone still working on this? Happy to take this on if no one is.

  6. potiuk commented on Dec 29, 2022

    @potiuk
    Member

    Feel free - if @alexbegg won't object :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions