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

Allow notif modal #1520

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Allow notif modal #1520

wants to merge 16 commits into from

Conversation

mishramonalisha76
Copy link
Contributor

@mishramonalisha76 mishramonalisha76 commented May 10, 2024

Changes proposed

  • The Pr creates an allow notification modal
  • The modal opens when the user first clicks on opt-in .
  • If block/ allow is clicked the modal does not open after that .
  • If skip is clicked , the modal opens after 24 hours if opted-in again.

Design -
Figma

Copy link

vercel bot commented May 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
push-dapp ❌ Failed (Inspect) May 22, 2024 7:19am

Copy link

In src/components/ViewChannelItem.jsx:

  1. There are no obvious mistakes or typos. The structure looks good.

In src/components/channel/AllowNotificationModal.tsx:

  1. There is a typo in fontWeigth="400", it should be fontWeight="400".
  2. Inside the <SpanV2>, the text needs to be enclosed within {}.
  3. Inside the <SpanV2>, the multiline text is not properly formatted.
  4. There seems to be a missing <SpanV2> component wrapping the multiline text intended to render.
  5. The fontSize and fontWeigth props are misspelled, they should be fontSize and fontWeight.
  6. In the <ButtonV2> component, the padding property should include 14px 0px in quotation marks.
  7. Inside the same <ButtonV2> component, there is a typo in fontWeigth, it should be fontWeight.
  8. There is a missing closing tag for the HandUp component after the console.error('opt in error'); line.
  9. The theme object is not passed to the <ModalContainer> styled component.

In src/components/dropdowns/OptinNotifSettingDropdown.tsx:

  1. The commented out code seems to be left in a non-functional state. It should be further adjusted before re-enabling if necessary.

In src/config/Themization.js:

  1. The themeLight object has some duplicate key declarations.
  2. The themeDark object has some duplicate key declarations as well.

In src/helpers/channel/allowNotification.ts:

  1. There is an irregular closing brace } in the checkPermission function right before the Notification.permission === 'granted' condition.
  2. The conditional structure inside the checkPermission function seems to be missing some implementation or logical flow.

In src/helpers/channel/types.ts:

  1. The ChannelSetting type definition is not closed properly with a closing brace }.
  2. The UserSetting type definition is not properly constructed and needs to be reformatted.
  3. There are some missing property definitions inside the ChannelSetting type.
  4. The NOTIF_PERMISSION_STATUS enum seems to have some inconsistent indentation and formatting.

Overall, the codebase requires several adjustments and error corrections in various files.

@rohitmalhotra1420
Copy link
Collaborator

@mishramonalisha76 I've added a couple of comments on the Pr related changes in types and utility functions. Please address them accordingly and make additional changes on top of it as you see fit.

@abhishek-01k could give it a functional review once the above comments are addressed.

Copy link

In the file src/components/channel/AllowNotificationModal.tsx:

  1. There is a typo in the SpanV2 component. Instead of fontWeigth, it should be fontWeight.

  2. Inside the ItemVV2, there is text that should be wrapped in a JSX tag. The text "We recommend enabling notifications for receiving updates from subscribed channels for a seamless experience." should be enclosed in a JSX tag.

  3. In the ButtonV2 component's style attributes, there are typos in the properties. Instead of fontWeigth, it should be fontWeight. Similarly, hoverBackground="none" should be background="none".

  4. There seems to be a missing closing tag for the C component inside ButtonV2.

  5. There is a missing closing tag for the ModalContainer component.

Other than these issues, the logic and structure of the component seem fine.

In the file src/helpers/channel/allowNotification.ts:

  1. Inside the checkPermission function, there is a missing } to close the function definiton before returning 'denied'.

Since these are minor issues, once corrected, the code should be good to go.

@mishramonalisha76
Copy link
Contributor Author

@mishramonalisha76 I've added a couple of comments on the Pr related changes in types and utility functions. Please address them accordingly and make additional changes on top of it as you see fit.

@abhishek-01k could give it a functional review once the above comments are addressed.

@rohitmalhotra1420 pushed the changes as per the review comments

Copy link
Collaborator

@rohitmalhotra1420 rohitmalhotra1420 left a comment

Choose a reason for hiding this comment

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

@mishramonalisha76 Looks good now. Let's close this after @abhishek-01k also approves it with a functional review.

Copy link

github-actions bot commented Jun 5, 2024

All looks good.

Copy link

github-actions bot commented Jun 5, 2024

PR Preview Action v1.4.7
🚀 Deployed preview to https://push-protocol.github.io/push-dapp/pr-preview/pr-1520/
on branch gh-pages at 2024-06-05 12:11 UTC

Copy link

github-actions bot commented Jun 5, 2024

All looks good.

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.

Add web notifications in the dApp
5 participants