-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add owner information to organization #6811
Conversation
@fm3 Please review backend parts |
…a_owner * 'master' of github.com:scalableminds/webknossos: Rewrite database tooling and support for postgres passwords (#6803)
@@ -299,6 +299,7 @@ function UpgradePricingPlanModal({ | |||
) : null} | |||
</> | |||
} | |||
zIndex={10000} // overlay everything |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@philippotto I tried to click somewhere in the background (document.body.click()
) to make the menu disappear but that did not work. With the high zIndex you can at least be sure that it overlays anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Only left some nitpicks/suggestions. Will test later.
frontend/javascripts/messages.tsx
Outdated
requiredPlan: string, | ||
organizationOwnerName: string, | ||
) => | ||
`This feature is not available in your organization's plan. Ask your organization owner ${organizationOwnerName} to upgrade to at least a ${requiredPlan} plan.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Ask the owner of your organization (John Doe)" would be more idiomatic english than "organization owner", I think.
Also, I'd change the type to organizationOwnerName: string | null
and then do a conditional on that so that the double space is avoided if the owner is not known.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I'd change the type to organizationOwnerName: string | null and then do a conditional on that so that the double space is avoided if the owner is not known.
Mhm, I was hoping that getFeatureNotAvailabeInPlanMessage()
already checks against null to avoid doing this logic in the messages
module. it, does not, however, prevent a double space.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, i see. i don't even know whether the double space is rendered at all? I think this could get collapsed into a single space by the browser? if it's rendered, fixing the doublespace without moving the null-check could work something like this: ... owner ${organizationOwnerName}to
(no space before "to") and then organizationOwnerName
should have a trailing space if it's not empty...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH, I would not optimize for extremely unlikely case that an orga has no owner. This can only ever be the case if a DB migration was not executed correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into this! I added some suggestions for the scala code :)
Co-authored-by: Florian M <[email protected]>
… orga_owner * 'orga_owner' of github.com:scalableminds/webknossos: Update app/models/user/User.scala
Co-authored-by: Florian M <[email protected]>
… orga_owner * 'orga_owner' of github.com:scalableminds/webknossos: Update app/models/organization/OrganizationService.scala
…a_owner * 'master' of github.com:scalableminds/webknossos: fixes loki log batching (#6828)
… orga_owner * 'orga_owner' of github.com:scalableminds/webknossos:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backend LGTM. Did not test, though
I noticed two things during testing:
Other than that, it works great 👍 |
Yes, this is intended. The toolbar has uses a tooltip for the description of all the individual tools that was "hijacked" for this message. This keeps things simple. |
Ok, fair enough 👍 |
… orga_owner * 'orga_owner' of github.com:scalableminds/webknossos:
@@ -236,6 +242,7 @@ export function getDisabledInfoForTools(state: OxalisState): Record< | |||
hasAgglomerateMappings, | |||
genericDisabledExplanation, | |||
state.activeOrganization, | |||
enforceActiveUser(state.activeUser), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why enforce? getFeatureNotAvailableInPlanMessage
should be able to handle null for the active user. i think this could crash currently when viewing a public annotation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great 👍
Steps to test:
Issues:
(Please delete unneeded items, merge only when none are left open)