rfellows commented on code in PR #11559:
URL: https://github.com/apache/nifi/pull/11559#discussion_r3831863394


##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/ui/common/parameter-context/index.ts:
##########
@@ -15,10 +15,18 @@
  * limitations under the License.
  */
 
-import { ParameterContextEntity } from '../../../state/shared';
+import { ParameterContextEntity, PostUpdateNavigationState } from 
'../../../state/shared';
 
 export interface EditParameterContextRequest {

Review Comment:
   Dropped. One clarification on the premise: this copy was used by production 
code — `parameter-context-listing.actions.ts` was importing 
`EditParameterContextRequest` from here, while 
`edit-parameter-context.component.ts` imported the state-module copy. All three 
importers (actions, component, spec) now reference 
`pages/parameter-contexts/state/parameter-context-listing`.



##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/parameter-contexts/ui/parameter-context-listing/parameter-context-listing.component.ts:
##########
@@ -52,6 +53,7 @@ import { ParameterContextTable } from 
'./parameter-context-table/parameter-conte
 })
 export class ParameterContextListing implements OnInit {
     private store = inject<Store<ParameterContextListingState>>(Store);
+    private router = inject(Router);

Review Comment:
   Added coverage in `parameter-context-listing.component.spec.ts`: it forwards 
`highlightedParameterName` from the navigation state into 
`getEffectiveParameterContextAndOpenDialog`, dispatches without a highlight 
when there is no navigation state, and does not dispatch at all until the 
parameter context is present in the store.
   
   On the timing question — you're right, and I've changed it. 
`lastSuccessfulNavigation` is a signal and was being read inside `subscribe()`, 
i.e. after the `switchMap`/`take(1)` that waits for the context to load, so a 
navigation completing during that wait would have been attributed to this 
request. It is now read in a `map` immediately after the route id emits, and 
the captured value is carried through the async wait.



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