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

[To Main] Feature - DESENG-629: Add new engagement fields #2537

Merged
merged 3 commits into from
Jun 10, 2024

Conversation

NatSquared
Copy link
Contributor

Issue #: 🎟️ DESENG-629

Description of changes:

  • Feature Add new fields for use in "new look" design 🎟️ DESENG-629
    • Added the fields sponsor_name, cta_message, and cta_url to the engagement model
    • Added Sponsor Name, Call To Action, and CTA URL to the engagement form
    • Added basic validation for the new fields

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).

@codecov-commenter
Copy link

codecov-commenter commented Jun 10, 2024

Codecov Report

All modified and coverable lines are covered by tests βœ…

Project coverage is 75.97%. Comparing base (34e3854) to head (4e36950).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2537      +/-   ##
==========================================
+ Coverage   75.94%   75.97%   +0.02%     
==========================================
  Files         603      603              
  Lines       21758    21781      +23     
  Branches     1667     1671       +4     
==========================================
+ Hits        16525    16548      +23     
  Misses       4970     4970              
  Partials      263      263              
Flag Coverage Ξ”
metapi 87.89% <100.00%> (+0.01%) ⬆️
metweb 64.52% <100.00%> (+0.03%) ⬆️

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

Files Coverage Ξ”
met-api/src/met_api/models/engagement.py 78.86% <100.00%> (+0.33%) ⬆️
...t-api/src/met_api/models/engagement_translation.py 96.92% <100.00%> (+0.09%) ⬆️
met-api/src/met_api/schemas/engagement.py 93.33% <100.00%> (+0.35%) ⬆️
...-api/src/met_api/schemas/engagement_translation.py 100.00% <100.00%> (ΓΈ)
met-api/src/met_api/services/engagement_service.py 71.35% <ΓΈ> (ΓΈ)
...met_api/services/engagement_translation_service.py 88.88% <100.00%> (+0.22%) ⬆️
met-web/src/components/common/Input/TextInput.tsx 100.00% <100.00%> (ΓΈ)
...b/src/components/engagement/form/ActionContext.tsx 61.40% <100.00%> (+0.22%) ⬆️
...ntFormTabs/EngagementContent/SummaryTabContent.tsx 87.50% <100.00%> (ΓΈ)
...agement/form/EngagementFormTabs/EngagementForm.tsx 88.13% <100.00%> (+1.34%) ⬆️
... and 3 more

@NatSquared NatSquared marked this pull request as ready for review June 10, 2024 21:16
@NatSquared NatSquared requested a review from Baelx June 10, 2024 21:16
Copy link
Collaborator

@Baelx Baelx left a comment

Choose a reason for hiding this comment

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

Thanks for the changes and for updating some of the language in the app to be clearer/more concise!

Could you please just remove the console logs!

@@ -43,7 +47,7 @@ const EngagementForm = () => {
setIsNewEngagement(!savedEngagement.id || savedEngagement.id === 0);
}, [savedEngagement]);

const getErrorMessage = () => {
const getNameError = () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

πŸ™πŸ»thanks for the more descriptive function name

Engagement Date
</BodyText>
<BodyText size="small">
Specify the date range for the public comment period, during which the public may provide
Copy link
Collaborator

Choose a reason for hiding this comment

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

πŸ‘πŸ»

@@ -548,7 +558,10 @@ export const EngagementTabsContextProvider = ({ children }: { children: React.Re
status_block: surveyBlockList,
});

console.log('Engagement saved:', engagement);
Copy link
Collaborator

Choose a reason for hiding this comment

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

πŸ‘€

if (!isNewEngagement) {
console.log('Updating engagement settings...');
Copy link
Collaborator

Choose a reason for hiding this comment

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

πŸ‘€

Copy link

sonarcloud bot commented Jun 10, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@NatSquared NatSquared merged commit 4f7b5bc into main Jun 10, 2024
15 checks passed
@NatSquared NatSquared deleted the feature/DESENG-629-add-new-engagement-fields branch June 10, 2024 22:05
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