-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Deprecation of operators should be prominently highlighted instead of the one line remark in the documentation #41532
Comments
I like your proposed solution @peter-gergely-horvath , would you like to help out with the PR? Might just be a change in this file: https://github.com/apache/airflow/blob/main/docs/sphinx_design/static/custom.css |
@kaxil I'd be happy to take this on, if the issue is still open. |
Assigned you |
Sorry guys, I only hacked the rendered page DOM inside the browser's dev tools to show what I mean here on a screenshot. I don't think I understand how the doc pages are generated. |
Here's the README for building docs and editing docs |
This issue has been automatically marked as stale because it has been open for 14 days with no response from the author. It will be closed in next 7 days if no further activity occurs from the issue author. |
The task is now picked up by geraj1010. I look forward to seeing the new design. :) |
@geraj1010 Are you still working on this one? |
@ferruzzi Yes I am. I recently just regained access to my account, so I have been delayed. Happy to collaborate on this. |
Hi, as discussed on this slack thread, there are a few Sphinx directives that can be explored that help do this without direct CSS changes:
I suppose any that looks fine and catches the user's attention should be good enough. cc: @ashb (thanks for the suggestion) |
This issue has been automatically marked as stale because it has been open for 14 days with no response from the author. It will be closed in next 7 days if no further activity occurs from the issue author. |
Greetings, I have been dragging my feet on this issue, but I am starting to look into it now. I think the |
…bigquery operator docstrings
@peter-gergely-horvath I was able to add some additional highlighting to show that the operator is deprecated. It's not exactly like your mockup, but at least it stands out more than just plain text. Thoughts? |
Looks good to me. |
Thank you @potiuk. |
I like it too. Definitely an improvement. |
I would love to see title colour change and strike-through, but if that is difficult to implement, I think this is quite fine. :) |
And it can be iterative too: this is already a good improvement :) |
Unfortunately, I think that would be difficult to implement. From what I understand, the documentation for the operators (and sensors) in the Python API section are gathered via Sphinx's AutoAPI extension at document generation runtime. This means that all styling is done on-the-fly and the I was thinking maybe we could achieve the original desired styling, by customizing the AutoAPI extension to look for any classes with the Thank you for the comment :) |
@geraj1010 it's looking nice & catchy! The user will definitely notice it while going through the doc I suppose, great work :) |
This issue has been automatically marked as stale because it has been open for 14 days with no response from the author. It will be closed in next 7 days if no further activity occurs from the issue author. |
PR #43909 for this issue is active and approved, but just needs a rebase (this issue isn't necessarily stale as such). |
What do you see as an issue?
While working with GCP BigQuery operators, I have noticed that some of the operators are deprecated. As the message was not prominent enough, first I failed to notice it, coded some of my DAGs with the old operators and then needed to re-write them so as to avoid deprecated functions. This is not great when it comes to documentation UX.
For example: https://airflow.apache.org/docs/apache-airflow-providers-google/stable/_api/airflow/providers/google/cloud/operators/bigquery/index.html#airflow.providers.google.cloud.operators.bigquery.BigQueryExecuteQueryOperator
Unless you explicitly double check or look for the deprecation notice, it is very easy to overlook it.
Solving the problem
I would propose adding the deprecation notice more prominently and changing the title background for additional highlighting.
If we know the operator is deprecated, all it takes is a little bit of CSS magic to make it absolutely stand out, say
I imagine something like this would be good (at least it is hard to miss the point 😊). Again, nothing more than a few lines of CSS should do the trick:
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: