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

build: update dgeni templates to include deprecated tag description #29873

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

naaajii
Copy link
Contributor

@naaajii naaajii commented Oct 13, 2024

changes how deprecated fields are generated for docs content, before this commit deprecated related text was shown via title attribute on hover and the deprecated tag description was never shown unless user check it manually via code. this commit exports deprecated tag description to reflect it directly in docs using material/tooltip on doc site

@naaajii naaajii requested a review from a team as a code owner October 13, 2024 23:21
@angular-robot angular-robot bot added the area: build & ci Related the build and CI infrastructure of the project label Oct 13, 2024
naaajii added a commit to naaajii/material.angular.io that referenced this pull request Oct 14, 2024
previously we weren't showing any other information other than `breaking-change` for deprecated fields, this commit adds a component that protrays information regarding deprecation in tooltips rather than `title` attribute

closes angular/components#29873
@naaajii
Copy link
Contributor Author

naaajii commented Oct 14, 2024

see comment for a preview.

tools/dgeni/templates/macros.html Outdated Show resolved Hide resolved
@@ -6,9 +6,7 @@ <h4 id="{$ constant.name $}" class="docs-header-link docs-api-h4 docs-api-consta
</h4>

{%- if constant.isDeprecated -%}
<div class="docs-api-constant-deprecated-marker" {$ macros.deprecationTitle(constant) $}>
Deprecated
Copy link
Member

Choose a reason for hiding this comment

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

Should we always keep Deprecated for accessibility reasons?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if you mean Deprecated text I made it change so that deprecationTitle have two parameter, the first one is the doc itself and second one is the label we would like to show tooltip against. In case of just keeping Deprecated we won't be able to show tooltip against deprecated class name or so.

Copy link
Member

Choose a reason for hiding this comment

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

I don't fully remember how it's showing up right now, but I was thinking we want some static text, next to the "class name" showing "Deprecated". That one you can hover for more details?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I reverted that change and kept the Deprecated text instead of adding it directly from the component on docs site.

changes how deprecated fields are generated for docs content, before this commit deprecated related
text was shown via `title` attribute on hover and the `deprecated` tag description was never shown
unless user check it manually via code. this commit exports `deprecated` tag description to
reflect it directly in docs using `material/tooltip` on doc site
Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

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

Ty

@devversion devversion added the target: minor This PR is targeted for the next minor release label Oct 23, 2024
@devversion devversion merged commit d93900c into angular:main Oct 23, 2024
23 checks passed
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: build & ci Related the build and CI infrastructure of the project target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants