jscheffl commented on code in PR #38080:
URL: https://github.com/apache/airflow/pull/38080#discussion_r1522197900


##########
airflow/www/static/js/dag/nav/FilterBar.tsx:
##########
@@ -152,6 +208,7 @@ const FilterBar = () => {
             background="white"
             variant="outline"
             onClick={clearFilters}
+            disabled={areFiltersDefault}

Review Comment:
   The "filter tasks" option on the right panel was influencing the state of 
the filter button - when tasks are filtered there, the "clear filters" button 
gets active, but clicking on it does not reset these. And as such the click 
does not have an effect.



##########
airflow/www/static/js/dag/nav/FilterBar.tsx:
##########
@@ -49,9 +63,23 @@ const FilterBar = () => {
     transformArrayToMultiSelectOptions,
   } = useFilters();
 
+  // @ts-ignore
+  const isBaseDateDefault = moment(now).isSame(baseDate, "minute");
+  const isNumRunsDefault = numRuns === defaultDagRunDisplayNumber.toString();
+  const isRunStateDefault = !runState || !runState.length;
+  const isRunTypeDefault = !runType || !runType.length;
+  const areFiltersDefault =
+    isBaseDateDefault &&
+    isNumRunsDefault &&

Review Comment:
   Why do you count the "number of runs" into the filter setting? It is 
contained in the filter bar but it is actually not really a filter, it rather 
provides more data/visibility?
   I believe so far it has been included in the reset and therefore the 
inclusion into coloring would be consistent but I am just thinking if we should 
exclude the number of runs from filter and reset?



-- 
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]

Reply via email to