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

Remove trickle down router props #4076

Merged
merged 10 commits into from
Jul 3, 2024
Merged

Conversation

cstns
Copy link
Contributor

@cstns cstns commented Jun 29, 2024

Remove trickle down router props and cohesive way of using team, teamMembership and isVisitingAdmin

Description

Focusing mainly on teamMembership & team props which can be used directly from the permissionsMixin, or using accessing the account store directly where the permission mixin is not used.

The isVisitingAdmin computed prop has also been moved in the permissionsMixin

Related Issue(s)

none

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production

Labels

  • Includes a DB migration? -> add the area:migration label

@cstns cstns self-assigned this Jun 29, 2024
Copy link

codecov bot commented Jun 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.72%. Comparing base (c03fe4f) to head (3e542b2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4076   +/-   ##
=======================================
  Coverage   78.72%   78.72%           
=======================================
  Files         284      284           
  Lines       13009    13009           
  Branches     2897     2897           
=======================================
  Hits        10241    10241           
  Misses       2768     2768           
Flag Coverage Δ
backend 78.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joepavitt joepavitt self-requested a review July 2, 2024 10:44
@joepavitt
Copy link
Contributor

I won't be able to review this today, so if someone else can step in, would appreciate it. My main point of concern is that if a user is logged in and viewing Team 1, and they directly navigate in the browser to a Team 2 page (e.g. viewing instances) that the new view reflects the correct team's data

@cstns
Copy link
Contributor Author

cstns commented Jul 2, 2024

I added two new tests to cover these specific scenarios

@Steve-Mcl Steve-Mcl self-requested a review July 3, 2024 09:45
Copy link
Contributor

@joepavitt joepavitt left a comment

Choose a reason for hiding this comment

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

You're missing an opportunity for the permissionsMixin in pages/application/Overview.vue

frontend/src/pages/application/createInstance.vue Outdated Show resolved Hide resolved
Copy link
Contributor

@Steve-Mcl Steve-Mcl left a comment

Choose a reason for hiding this comment

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

@joepavitt I went through this line by line with Serban . We found 1 left over prop and fixed that.

did a full review on pre-staging, tested all pages touched (with dev tools console open) and direct url access to alt teams etc.

I am happy to approve but will not merge as you may see something i dont

@joepavitt
Copy link
Contributor

@Steve-Mcl thanks Steve, just left my own comments on this too

Copy link
Contributor

@Steve-Mcl Steve-Mcl left a comment

Choose a reason for hiding this comment

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

all good from my pov.

@cstns cstns enabled auto-merge July 3, 2024 11:22
@cstns cstns requested a review from joepavitt July 3, 2024 11:22
@cstns cstns merged commit 72923d8 into main Jul 3, 2024
13 checks passed
@cstns cstns deleted the remove-trickle-down-router-props branch July 3, 2024 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants