From 1054d64115a4a13803c29c215d623d47017ae0de Mon Sep 17 00:00:00 2001 From: Rajas Panat Date: Wed, 6 May 2026 16:10:08 -0400 Subject: [PATCH 1/4] adding a deprecation marker to class, object and profile pages Signed-off-by: Rajas Panat --- lib/schema_web/templates/layout/app.html.eex | 6 ++++ lib/schema_web/templates/page/class.html.eex | 10 ++++++ lib/schema_web/templates/page/object.html.eex | 10 ++++++ .../templates/page/profile.html.eex | 10 ++++++ lib/schema_web/views/page_view.ex | 32 +++++++++++++++++++ 5 files changed, 68 insertions(+) diff --git a/lib/schema_web/templates/layout/app.html.eex b/lib/schema_web/templates/layout/app.html.eex index 38c3ccd..d80516a 100644 --- a/lib/schema_web/templates/layout/app.html.eex +++ b/lib/schema_web/templates/layout/app.html.eex @@ -95,6 +95,9 @@ limitations under the License. case '/objects': $('#objects_id a.nav-link').addClass("active"); break; + case '/profiles': + $('#profiles_id a.nav-link').addClass("active"); + break; case '/objects/observable': $('#observable_id a.nav-link').addClass("active"); break; @@ -248,6 +251,9 @@ limitations under the License. + diff --git a/lib/schema_web/templates/page/class.html.eex b/lib/schema_web/templates/page/class.html.eex index 21c3084..b811a35 100644 --- a/lib/schema_web/templates/page/class.html.eex +++ b/lib/schema_web/templates/page/class.html.eex @@ -51,6 +51,16 @@ limitations under the License.
<%= raw description(@data) %>
+ <%= if has_deprecated_attributes?(@data) do %> + <% dep_count = deprecated_attributes_count(@data) %> +
+ + + This class contains <%= dep_count %> deprecated <%= if dep_count == 1, do: "attribute", else: "attributes" %>. + Check the Show deprecated items box in the sidebar to view <%= if dep_count == 1, do: "it", else: "them" %>. + +
+ <% end %> <%= if observables != nil and !Enum.empty?(observables) do %>
Class-specific attribute path observables are at the bottom of this page. diff --git a/lib/schema_web/templates/page/object.html.eex b/lib/schema_web/templates/page/object.html.eex index 64fdce3..8342c3b 100644 --- a/lib/schema_web/templates/page/object.html.eex +++ b/lib/schema_web/templates/page/object.html.eex @@ -46,6 +46,16 @@ limitations under the License.
<%= raw description(@data) %>
+ <%= if has_deprecated_attributes?(@data) do %> + <% dep_count = deprecated_attributes_count(@data) %> +
+ + + This object contains <%= dep_count %> deprecated <%= if dep_count == 1, do: "attribute", else: "attributes" %>. + Check the Show deprecated items box in the sidebar to view <%= if dep_count == 1, do: "it", else: "them" %>. + +
+ <% end %> <%= raw object_references_section(references) %>