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

Subscribe Widget - Email list form tab #1879

Merged
merged 29 commits into from
Jul 31, 2023

Conversation

djnunez-aot
Copy link
Collaborator

@djnunez-aot djnunez-aot commented Jul 24, 2023

-Add form for Email list

-Add rich editor to context

-update subscribe context

image

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the met-public license (Apache 2.0).

@djnunez-aot djnunez-aot marked this pull request as draft July 24, 2023 14:10
@djnunez-aot djnunez-aot changed the title Email list form tab Subscribe Widget - Email list form tab Jul 24, 2023
resolver: yupResolver(schema),
});

const getTextFromDraftJsContentState = (contentJSON: string): string => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Theres's a utils file in the rich text editor folder, could you check if this exists there already and if not to add it there

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it does not but I added it there as you suggested

.object({
description: yup.string().max(500, 'Description cannot exceed 500 characters'),
cta_type: yup.string(),
cta_text: yup.string().max(25, 'Description cannot exceed 25 characters'),
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you choose a more descriptive name than cta, also the error message still has Description

@djnunez-aot djnunez-aot marked this pull request as ready for review July 27, 2023 14:45
@codecov-commenter
Copy link

codecov-commenter commented Jul 27, 2023

Codecov Report

Merging #1879 (2a8adf5) into main (8e2df2e) will decrease coverage by 0.66%.
Report is 10 commits behind head on main.
The diff coverage is 53.40%.

@@            Coverage Diff             @@
##             main    #1879      +/-   ##
==========================================
- Coverage   70.38%   69.73%   -0.66%     
==========================================
  Files         426      439      +13     
  Lines       12874    13354     +480     
  Branches      974      989      +15     
==========================================
+ Hits         9061     9312     +251     
- Misses       3644     3864     +220     
- Partials      169      178       +9     
Flag Coverage Δ
metapi 78.15% <73.36%> (-0.20%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
met-api/src/met_api/models/widget_events.py 100.00% <ø> (ø)
met-web/src/apiManager/endpoints/index.ts 100.00% <ø> (ø)
met-web/src/services/subscriptionService/index.ts 18.46% <15.00%> (-8.47%) ⬇️
...m/EngagementWidgets/Subscribe/SubscribeContext.tsx 16.07% <16.07%> (ø)
...ngagementWidgets/Subscribe/EmailListFormDrawer.tsx 32.78% <32.78%> (ø)
...m/EngagementWidgets/Subscribe/FormSignUpDrawer.tsx 39.02% <39.02%> (ø)
...form/EngagementWidgets/Subscribe/SubscribeForm.tsx 56.25% <56.25%> (ø)
met-api/src/met_api/resources/widget_subscribe.py 62.82% <62.82%> (ø)
...i/src/met_api/services/widget_subscribe_service.py 66.66% <66.66%> (ø)
met-api/src/met_api/models/widgets_subscribe.py 88.00% <88.00%> (ø)
... and 10 more

... and 4 files with indirect coverage changes

@jadmsaadaot jadmsaadaot marked this pull request as draft July 27, 2023 17:27
@djnunez-aot djnunez-aot marked this pull request as ready for review July 28, 2023 15:33
@sonarcloud
Copy link

sonarcloud bot commented Jul 31, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@djnunez-aot djnunez-aot merged commit 65921cb into bcgov:main Jul 31, 2023
16 checks passed
NatSquared pushed a commit that referenced this pull request Oct 19, 2023
* email list & form sign up tabs

* add rich text editor to both drawers

* push changes

* add subscribe widget path

* add print statements for debugging

* update routes

* update column type cleanup pr

* cleanup pr

* remove unused imports

* py lint

* lint and add unit test

* update revisions

* update test file

* pylint

* Update factory_scenarios.py

* add subscription import

* pylint

* fix head colisions

* update tests

* update test

* add .strip function for json

* update

* update widget test

* add more logs

* lint

* isort fix

* application out of context error

* add widget_id to filtering
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