amoghrajesh commented on code in PR #70298:
URL: https://github.com/apache/airflow/pull/70298#discussion_r3774419136
##########
registry/src/provider-version.njk:
##########
@@ -383,6 +383,19 @@ eleventyComputed:
<section class="modules">
<div class="modules-header">
<h2>Modules</h2>
+ {% if pv.isLatest %}
Review Comment:
Good catch, the `isLatest` gate only covered one of the two failure modes
you found. Switched to counting qualifying modules directly in the template
(mirroring the existing `totalModules` accumulator and the `moduleCounts[t.id]
> 0` gate the type tabs already use) and rendering each toggle only when its
count is non-zero. This covers the stale data case (a field that's missing or
false everywhere computes to a zero count) and the genuinely empty case with
the same check, and self-heals after every rebuild without needing to
special-case either. Put the count in each label too, per your suggestion.
Verified against real data: Databricks shows both toggles at `(7)`/`(7)`;
Apache Spark shows only the Durable toggle at `(1)` with no Deferrable toggle
in the DOM at all (it has zero deferrable operators); a provider with neither
capability renders no toggle block whatsoever. Also confirmed the toggles still
compose correctly with the existing type/category/search filters. (see image
for DBX)
One piece from your comment I have not done yet: the empty state message for
when a filter combination client side narrows to zero results (right now it
just goes blank, same as before). Happy to add that here too if you'd rather
not split it into a separate follow-up.
<img width="1981" height="1112" alt="image"
src="https://github.com/user-attachments/assets/262f9d8b-e369-4a2d-8c40-6ae9fcecee7e"
/>
<img width="1981" height="1112" alt="image"
src="https://github.com/user-attachments/assets/aa24f7f9-f3e4-48e3-beab-c5e26986636a"
/>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]