Skip to content

Conversation

fisx
Copy link
Contributor

@fisx fisx commented Jul 29, 2022

https://wearezeta.atlassian.net/browse/SQSERVICES-759

Checklist

  • The PR Title explains the impact of the change.
  • The PR description provides context as to why the change should occur and what the code contributes to that effect. This could also be a link to a JIRA ticket or a Github issue, if there is one.
  • If this PR changes development workflow or dependencies, they have been A) automated and B) documented under docs/developer/. All efforts have been taken to minimize development setup breakage or slowdown for co-workers.
  • If HTTP endpoint paths have been added or renamed, or feature configs have changed, the endpoint / config-flag checklist (see Wire-employee only backend wiki page) has been followed.
  • If a cassandra schema migration has been added, I ran make git-add-cassandra-schema to update the cassandra schema documentation.
  • changelog.d contains the following bits of information (details):
    • A file with the changelog entry in one or more suitable sub-sections. The sub-sections are marked by directories inside changelog.d.
    • If new config options introduced: added usage description under docs/reference/config-options.md
    • If new config options introduced: recommended measures to be taken by on-premise instance operators.
    • If a cassandra schema migration is backwards incompatible (see also these docs), measures to be taken by on-premise instance operators are explained.
    • If a data migration (not schema migration) introduced: measures to be taken by on-premise instance operators.
    • If public end-points have been changed or added: does nginz need un upgrade?
    • If internal end-points have been added or changed: which services have to be deployed in a specific order?

@fisx fisx temporarily deployed to cachix July 29, 2022 10:50 Inactive
@fisx fisx force-pushed the allow-remove-splash-screen branch from f8187cb to 6ddcf42 Compare July 29, 2022 14:07
@fisx fisx temporarily deployed to cachix July 29, 2022 14:07 Inactive
E.deleteTeamSplashScreen tid
now <- input
memList <- getTeamMembersForFanout tid
let e = newEvent tid now (EdTeamUpdate newTeamUpdateData)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not very happy about this: deleting the splash screen is not the same as changing nothing. :) Maybe add a new constructor to TeamUpdateData?

updateTeamDeleteSplashScreenH zusr zcon tid = do
zusrMembership <- E.getTeamMember tid zusr
void $ permissionCheckS SSetTeamData zusrMembership
E.deleteTeamSplashScreen tid
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not convinced this is the right approach, but the alternative of changing TeamUpdateData to accomodate both leaving the splash screen intact (Nothing) and setting it to Nothing (???) doesn't appeal to me either. We could change the Maybe to something like:

data ChangeSplashScreen = Keep | Delete | Set AssetKey

But then how would that translate into json? like this?:

{ ... 
  "splash_screen": null | {"delete"} | {"set": "key"},
  ...
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I mean:

  "splash_screen": null | {"delete": true} | {"set": "key"},

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ended up doing what Patryk suggested earlier, namely do the same thing we're already doing for the Icon (aka Logo) here.

@fisx fisx force-pushed the allow-remove-splash-screen branch from 6ddcf42 to 7364411 Compare August 1, 2022 12:59
@fisx fisx temporarily deployed to cachix August 1, 2022 12:59 Inactive
@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Aug 1, 2022
@fisx fisx temporarily deployed to cachix August 1, 2022 14:30 Inactive
@fisx
Copy link
Contributor Author

fisx commented Aug 1, 2022

Golden tests are still failing, but it's ready for review!

@fisx fisx marked this pull request as ready for review August 1, 2022 14:31
@fisx fisx requested a review from pcapriotti August 1, 2022 14:31
@fisx fisx temporarily deployed to cachix August 1, 2022 15:17 Inactive
@fisx fisx temporarily deployed to cachix August 2, 2022 07:13 Inactive
@fisx
Copy link
Contributor Author

fisx commented Aug 2, 2022

ok, this failure is also legit, fix coming up.

@fisx fisx temporarily deployed to cachix August 2, 2022 08:08 Inactive
Copy link
Contributor

@pcapriotti pcapriotti left a comment

Choose a reason for hiding this comment

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

LGTM.

@fisx fisx merged commit 5c04a2b into develop Aug 2, 2022
@fisx fisx deleted the allow-remove-splash-screen branch August 2, 2022 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants