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

Opt-In Dropdown for dashboard #1802

Merged
merged 3 commits into from
Aug 12, 2024
Merged

Conversation

abhishek-01k
Copy link
Collaborator

Pull Request Template

Description

New Subscribe and Unsubscribe dropdown for the dashboard. Added query for subscribe channel, unscubscribe channel and save notiifcations settings. Also, used the new components for the dropdown.

  • Problem/Feature:

Type of Change

  • Bug fix
  • New feature
  • Code refactor
  • Documentation update
  • Other (please describe):

Checklist

  • Quick PR: Is this a quick PR? Can be approved before finishing a coffee.
    • Quick PR label added
  • Not Merge Ready: Is this PR dependent on some other PR/tasks and not ready to be merged right now.
    • DO NOT Merge PR label added

Frontend Guidelines

Build & Testing

  • No errors in the build terminal
  • Engineer has tested the changes on their local environment
  • Engineer has tested the changes on deploy preview

Screenshots/Video with Explanation

https://www.figma.com/design/FvJL0JWHlsVohsHTERB1Lh/Push-Design-Foundations?node-id=6696-9326&t=stUlFf9CbAIdY9PF-0

Screenshot 2024-08-08 at 4 28 28 PM
Screenshot 2024-08-08 at 4 29 04 PM

Additional Context

Review & Approvals

  • Self-review completed
  • Code review by at least one other engineer
  • Documentation updates if applicable

Notes

You can try to subscribe on Test Dev 5 channel and Node tester channel. It has the settings

Copy link

github-actions bot commented Aug 8, 2024

All looks good.

Copy link

github-actions bot commented Aug 8, 2024

PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-08-12 13:38 UTC

src/queries/services/user/unsubscribeChannel.ts Outdated Show resolved Hide resolved
src/queries/services/user/subscribeToChannel.ts Outdated Show resolved Hide resolved
src/common/components/UnsubscribeChannelDropdown.tsx Outdated Show resolved Hide resolved
src/common/components/UnsubscribeChannelDropdown.tsx Outdated Show resolved Hide resolved
src/common/components/UnsubscribeChannelDropdown.tsx Outdated Show resolved Hide resolved
src/common/components/NotificationSettingsDropdown.tsx Outdated Show resolved Hide resolved
src/common/components/ManageSettingsDropdown.tsx Outdated Show resolved Hide resolved
src/common/components/ManageSettingsDropdown.tsx Outdated Show resolved Hide resolved
src/common/components/ManageSettingsDropdown.tsx Outdated Show resolved Hide resolved
src/common/components/NotificationSettingsDropdown.tsx Outdated Show resolved Hide resolved
Copy link

In the Dropdown.tsx file:

  1. Line 38: Change onClick={() => trigger == 'click' && toggleDropdown} to onClick={() => trigger === 'click' && toggleDropdown()}.
  2. Line 49: Change trigger == 'hover' to trigger === 'hover' for onMouseEnter and onMouseLeave events.
  3. Line 84: Add parentheses to onClick event: onClick={() => trigger === 'click' && toggleDropdown()}.

In the ManageSettingsDropdown.tsx file:

  1. Line 35: if (updatedSettings[index].type === 1) should be changed to if (updatedSettings[index].type === 1) {.
  2. Line 46: Add missing declaration for updatedSettings above in the function.
  3. Line 58: Add updatedSettings before updatedSettings[index] to fix the variable reference.
  4. Line 66: Add closing curly brace } to close the condition block for type 2.
  5. Line 78: Add closing curly brace } to close the condition block for type 3.
  6. Line 126: The assignment in {setting.user || setting.default} should be replaced with the appropriate logic based on the expected result.
  7. Line 186: defaultEndVal should be replaced with defaultUpperVal to maintain consistency in naming.
  8. Line 196: Replace handleSliderChange with handleSliderRangeChange in onChange event.

These are the corrections needed in the provided snippets.

Copy link

In the Dropdown.tsx file:

  1. Line 37: onClick={() => trigger == 'click' && toggleDropdown} should be onClick={() => trigger === 'click' && toggleDropdown()}
  2. Line 112: if (updatedSettings[index].type === 1) is missing updatedSettings declaration before the IF condition.
  3. Line 122: if (updatedSettings[index].type === 2) is missing updatedSettings declaration before the IF condition.
  4. Line 157: if (setting.type === 3) is missing updatedSettings declaration before the IF condition.
  5. There seems to be more code not shown, but based on what's visible, those are the changes needed.

In the InputSlider.tsx file:

  1. Line 37: border-bottom-left-radius: 8px; in Active styled component is missing the closing curly brace }.
  2. Line 46: background-color: #eaebf2; in Inactive styled component is missing the closing curly brace }.
  3. Line 52: height: 24px; in Container styled component is missing the closing semi-colon ;.

Other files are not displayed, so I cannot review them.

Overall, please fix the issues mentioned above in the respective files. Let me know if you need further assistance or clarification.

@rohitmalhotra1420 rohitmalhotra1420 merged commit a0a3ddd into main Aug 12, 2024
2 checks passed
corlard3y pushed a commit that referenced this pull request Aug 14, 2024
* Opt-In Dropdown for dashboard

* Fixed the comments and issues

* Fixed the context issue
rohitmalhotra1420 added a commit that referenced this pull request Sep 30, 2024
* added loading colour

* add icon

* add components

* update styles

* update mobile view

* update titles

* change button labels

* update multiplier

* update useDailyRewards hook

* update unlock profile modal changes

* update usedailyrewards hook

* fix isLoading onclick

* update locked status/ rewards ui

* update new users status

* add skeleton loader

* comment out stake push activities

* update skeleton loader

* update locked icon

* format text

* feat: add alert ds component (#1781)

* feat: add alert ds component

* chore: update alert ds acc to review

* chore: update component acc to review

* update alert for error messages

* update indexes

* Update Dashboard.tsx

* remove unusued

* fixed review comments

* Update Button.tsx

* update completed state

* fixed the spinner and button

* fixed the spinner and button

* Added spinner component (#1783)

* added spinner component

* added review changes

* added correct variants

* added the review comments

* added the review comments

* Add progress bar to ds (#1787)

* feat: add progress bar to ds

* chore: update progress bar according to review

* add loading state

* update locked status

* update isLocked

* update loading state

* remove disabled state from button

* update locked divider

* update error message

* fix icons and illustrations

* update naming and imports

* update reward activites hook

* update type

* add types

* resolve conments

* update box

* update text changes

* update text

* update points real time

* update mutiplier conditions in bonus

* update gap

* update padding referal section

* adjust daily section ui

* update stake array

* update stake api

* update rewards verification hook

* fix: yield farming layouts and resize buttons to take full width (#1793)

* Add support for erc1155 (#1794)

* chore: add support for erc1155

* chore: update uiweb version to include erc1155 support

* Replaced older tab implementation in trending channels with the new tab block component (#1800)

* added

* moved function to utils

* tab changes

* reverted rewards tab change

* Update Dashboard.utils.ts

* Opt-In Dropdown for dashboard (#1802)

* Opt-In Dropdown for dashboard

* Fixed the comments and issues

* Fixed the context issue

* DS-Dapp Notification Component  (#1801)

* add in-app semantics and block files

* update notification component

* add localstorage identifier

* update library

* add duration option

* resolve comments

* update comment fixes

* fix comments

* testing notification

* update notification component

---------

Co-authored-by: rohitmalhotra1420 <[email protected]>

* DApp-1804 tag component added in blocks (#1805)

* tag in progress

* implemented tag component

* Tag component implemented in blocks

* update hook and export component

* update code

* add componentdid mount flow

* update mount logic

* fix stake font size

* fix conflicts

* Fixed create channel ui , fixed message for unlock profile, removed governance from sidebar (#1817)

* fixed minor ui issues

* fixed minor ui issues

* fixed minor ui issues

* fixed select text color

* fixed select text color

* fixed select text color

* fixed chain issue

* fixed send notif delegate issue (#1822)

* fixed send notif delegate issue

* Fixed the send notification button on the navigation for delegatee list

* added fixes for alias

* added fixes for alias

* fixed review comment

---------

Co-authored-by: abhishek-01k <[email protected]>

* DApp-1799 blocks/table (#1824)

* table in progress

* in progress

* in progress

* table complete

* fixed header route +  reverted changes

* added alignment support

* set debug to false

* fix comments

* export type and fix issues

* update rewards notification

* fix loading state

* add activit days

* update locked status

* updates test whitelist file for nft claims

* fixed smart contract for alpha nft

* update reset time

* refactor code

* update fixes

* stake push

* update types

* update yarn.lock

* update icons

* update icons batch 2

* sort stake section

* add local storage key

* update hasEnded and has text

* fixed channel notifications (#1852)

* added the new monotone icons (#1857)

* added support for icons in tag components (#1853)

* update stat in yield farming data store (#1859)

* update refetch leaderboard

* fix double text issue - media query

* update icon

* hide notifs

* update font sizes

* fix invalid verification proof issue

* remove console

* update success flow

* fixes done

* removed the png file

* lock file fixed

* remove isActive Account in auth hook

---------

Co-authored-by: Monalisha Mishra <[email protected]>
Co-authored-by: rohitmalhotra1420 <[email protected]>
Co-authored-by: Kalash Shah <[email protected]>
Co-authored-by: Monalisha Mishra <[email protected]>
Co-authored-by: Abhishek <[email protected]>
Co-authored-by: abhishek-01k <[email protected]>
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.

2 participants