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

Feature: Default form tooltip #7590

Open
wants to merge 20 commits into
base: epic/campaigns
Choose a base branch
from

Conversation

alaca
Copy link
Member

@alaca alaca commented Oct 25, 2024

Description

This PR adds a new tooltip that highlights the default form in the campaigns forms list table.

Affects

Donation forms list table

Visuals

Screen.Recording.2024-10-28.at.09.43.07.mov

Testing Instructions

Pre-review Checklist

  • Relevant @unreleased tags included in DocBlocks
  • Self Review of code and UX completed

Copy link
Member

@kjohnson kjohnson left a comment

Choose a reason for hiding this comment

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

@alaca this seems more complex than I was expecting - especially for a single use notice.

It looks like we are having to modify/extend the existing notice system to make this work - updating the store, introducing a dismiss option, and a new <Custom /> notice type.

Does this need to be a registered notice or can we simplify this?

@alaca
Copy link
Member Author

alaca commented Oct 29, 2024

@kjohnson my initial idea was to do exactly as you said, write a simple component that will be shown when needed. But then I got an idea to use the existing system, and having a custom and flexible notice option made sense. The biggest advantage of this approach is that any add-on can register a notification. I think we will have more and more stuff like this and having a system in place would help us in the long run. But, I understand your concern regarding added complexity. I can refactor this and use a simplified approach.

Copy link
Contributor

@glaubersilva glaubersilva left a comment

Choose a reason for hiding this comment

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

@alaca I'm getting the following error when I try to compile the assets:

ERROR in ./src/DonationForms/V2/resources/components/DonationFormsListTable.tsx 406:0-87
Module not found: Error: Can't resolve '@givewp/campaigns/admin/components/Notifications' in 'C:\Users\glaub\Local Sites\givewp\app\public\wp-content\plugins\give\src\DonationForms\V2\resources\components'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".ts",".tsx"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".ts",".tsx"]'?

image

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.

3 participants