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

Rename Organizations to Teams in the data model #9170

Merged
merged 24 commits into from
Sep 19, 2024
Merged

Conversation

grahamlangford
Copy link
Collaborator

What does this PR do?

For more information on our expectations for the PR process, see the
code review principles doc

…9131-slice-3-deactivate-all-team-mods-not-in-a-deployment
…/pixiebrix-extension into 9131-slice-3-deactivate-all-team-mods-not-in-a-deployment
…9131-slice-3-deactivate-all-team-mods-not-in-a-deployment
Copy link

codecov bot commented Sep 18, 2024

Codecov Report

Attention: Patch coverage is 61.53846% with 30 lines in your changes missing coverage. Please review.

Project coverage is 74.79%. Comparing base (8318d74) to head (a0e1657).
Report is 303 commits behind head on main.

Files with missing lines Patch % Lines
...ensionConsole/pages/packageEditor/SharingTable.tsx 0.00% 9 Missing ⚠️
src/data/model/MeTeamMembership.ts 0.00% 5 Missing ⚠️
src/data/service/backgroundApi.ts 33.33% 4 Missing ⚠️
src/data/model/UserRole.ts 25.00% 3 Missing ⚠️
...pages/packageEditor/referenceTab/PackageResult.tsx 0.00% 2 Missing ⚠️
src/hooks/useDatabaseOptions.ts 33.33% 2 Missing ⚠️
src/background/teamTrialUpdater.ts 0.00% 1 Missing ⚠️
.../components/floatingActions/initFloatingActions.ts 0.00% 1 Missing ⚠️
src/data/model/Me.ts 75.00% 1 Missing ⚠️
src/data/model/Team.ts 92.85% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9170      +/-   ##
==========================================
+ Coverage   74.24%   74.79%   +0.54%     
==========================================
  Files        1332     1360      +28     
  Lines       40817    41880    +1063     
  Branches     7634     7823     +189     
==========================================
+ Hits        30306    31325    +1019     
- Misses      10511    10555      +44     

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

Copy link

github-actions bot commented Sep 18, 2024

Playwright test results

passed  121 passed
flaky  7 flaky
skipped  4 skipped

Details

report  Open report ↗︎
stats  132 tests across 44 suites
duration  57 minutes, 38 seconds
commit  a0e1657
info  For more information on how to debug and view this report, see our readme

Flaky tests

chrome › tests/pageEditor/addStarterBrick.spec.ts › Add starter brick to mod
msedge › tests/pageEditor/addStarterBrick.spec.ts › Add starter brick to mod
chrome › tests/pageEditor/brickConfiguration.spec.ts › brick configuration
msedge › tests/runtime/customEvents.spec.ts › custom event brick functionality
msedge › tests/runtime/sidebar/sidebarNavigation.spec.ts › sidebar mod panels are persistent during navigation
msedge › tests/runtime/srcdocFrames.spec.ts › 8143: mods can run in srcdoc iframes
chrome › tests/smoke/floatingActionButton.spec.ts › sidebar page smoke test › can hide the floating action button

Skipped tests

chrome › tests/regressions/doNotCloseSidebarOnPageEditorSave.spec.ts › #8104: Do not automatically close the sidebar when saving in the Page Editor
msedge › tests/regressions/doNotCloseSidebarOnPageEditorSave.spec.ts › #8104: Do not automatically close the sidebar when saving in the Page Editor
chrome › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options
msedge › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options

</tr>
),
)}
{sortBy(organizations, (x) => x.teamName).map((organization) => (
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: opportunity to rename these local variables. Makes sense if you want to keep the scope of this to types and data model though

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was, but I went ahead and did this renaming real quick. There are definitely some opportunities for follow-on renaming work. Such as renaming the api hooks (useGetOrganizations -> useGetTeams for example)

Copy link

No loom links were found in the first post. Please add one there if you'd like to it to appear on Slack.

Do not edit this comment manually.

@grahamlangford grahamlangford enabled auto-merge (squash) September 19, 2024 15:31
@grahamlangford grahamlangford merged commit bb1e31d into main Sep 19, 2024
20 checks passed
@grahamlangford grahamlangford deleted the rename-orgs-teams branch September 19, 2024 16:34
grahamlangford added a commit that referenced this pull request Sep 20, 2024
* refactor/extract duplicated functions; create syncActivatedModCOmponents

* run team trial updater in the background

* fix modUpdater test, create deactivateMod test

* create initial data model

* finish implementing transformers

* fix typing

* remove dead code

* switch back to LegacyUserRole and change organization.role to organization.isAdmin

* remove dead code; use UserRole

* remove the lifted value from Organzation

* rename OrganizationMembers -> OrganizationMemberships

* member -> membership

* update typings

* adds deactivateModComponent tests

* organization -> team

* rename all service layer level organization types to ream

* rename local variables
@grahamlangford grahamlangford added this to the 2.1.2 milestone Sep 20, 2024
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