Skip to content

Conversation

@Adamj1232
Copy link
Contributor

Description

This PR is to allow the decoupling of the Account Center and Notifications.
To do this the initialization type of Notifications needed to expand to allow similar desktop and mobile positioning in the same pattern as Account Center.
This was developed with backwards compatibility in mind so initialization allows NotifyOptions as well as Notify that the initial release was set to accept and validate within the init.

Checklist

  • The version field in package.json is incremented following semantic versioning
  • The box that allows repo maintainers to update this PR is checked
  • I tested locally to make sure this feature/fix works
  • This PR passes the Circle CI checks


export type NotifyOptions = {
desktop: Notify
mobile: Notify
Copy link
Contributor

Choose a reason for hiding this comment

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

@Adamj1232 Could we possible discuss naming conventions here? Notify vs NotifyOptions
why are they separate? and then possibly leave the Notify namespace open in the event that we decouple notify from w3o and need to use the Notify type? Just a thought

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@taylorjdawson I see what you are saying, I was following the pattern we have used for AccountCenter where ...Options are passed in on init and Notify in this case is used internally for Notify configurations. If we were to decouple I dont see a challenge and updating the types but def want to have similar patterns with the different components

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay no worries, is there a way to make the name more descriptive? When I saw the Notify type I thought it excepted a notify instance.

@Adamj1232 Adamj1232 merged commit adcc3cc into v2-web3-onboard-develop Jun 27, 2022
This was referenced Jun 28, 2022
@Adamj1232 Adamj1232 deleted the update/position_notify_AC branch January 26, 2023 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants