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

Fix: Broken community portal link #379

Merged
merged 4 commits into from
Aug 23, 2024
Merged

Fix: Broken community portal link #379

merged 4 commits into from
Aug 23, 2024

Conversation

abdullai-t
Copy link
Contributor

@abdullai-t abdullai-t commented Aug 21, 2024

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Performance improvement
  • Feature removal
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

Other information:
Community URLs on the campaign homepage are no longer broken.

Updated the COMMUNITY_PORTAL_URL to dynamically generate the base URL depending on the environment. Added a utility function `getCommunityPortalBaseURL` to handle this logic.
Copy link

netlify bot commented Aug 21, 2024

Deploy Preview for neon-sopapillas-14a279 ready!

Name Link
🔨 Latest commit b650ecb
🔍 Latest deploy log https://app.netlify.com/sites/neon-sopapillas-14a279/deploys/66c871cdf6939d0008c008e5
😎 Deploy Preview https://deploy-preview-379--neon-sopapillas-14a279.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

src/utils/utils.js Outdated Show resolved Hide resolved
Consolidate community portal URLs into a single `BASE_URL` constant. This change simplifies URL management and reduces redundancy in the codebase. The `getCommunityPortalBaseURL` function has been removed and replaced with a cleaner variable definition.
The `if (IS_PROD)` condition has been changed to `else if (IS_PROD)` to ensure it is mutually exclusive with previous conditions. This prevents the production URL assignment from being skipped if a prior condition is satisfied.
@abdullai-t abdullai-t requested a review from archx3 August 23, 2024 12:14
@archx3 archx3 merged commit f172255 into dev Aug 23, 2024
6 checks passed
@abdullai-t abdullai-t linked an issue Aug 26, 2024 that may be closed by this pull request
archx3 added a commit that referenced this pull request Aug 29, 2024
* scraped static texts on all pages

* got text from modals as well

* added common languages offered

* setting up redux for manual language selection

* hooked dropdown to redux data

* feat: lang selection working with dummy data set. Selection persists too

* whole of homepage now depends on static text object

* interactions, comment box, events and testimonial section all looking good

* one testimonial, one events page 🔥

* several changes json object for static text and testing with dummy translations

* language is now automatically added to apiCall

* fixed bug with comment component translation

* more translations, and tweaks to page json structure

* testimonial form now translated too

* getting started with languages offered page

* still setting up multi select on dropdown. checkbox in dropdown is not checking yet

* removing language works locally

* setup admin lang selector and docked it at the top of campaign edit page

* dropdown for language context on admin side now works with admin selected languages

* remove log

* Now changed to toggles

* removed comments and added translation for fallback text

* removed logs

* edited toggles

* add language back in there

* sort languages

* translated more fallback texts

* translated preview mode & events too

* paused on admin tans for now

* removed comments and limited languages

* now loads language list from api

* better config log

* version number bump

* point to dev

* Bump BUILD_VERSION to 1.1.1

* user language

* remove about

* version number resolution

* upgrade

* Bump BUILD_VERSION to 1.1.4

* en-us

* Bump BUILD_VERSION to 1.1.5

* toggling languages works for admins

* client side loads from toggle list

* dont show ribbon when no list is provided

* dash will be provided if only one enabled language

* fix nav issue

* english cant be toggled, several tweaks to frontend logic

* pre testimonial translations setup for homepage area

* translated more dialogs

* resolved some circular imports

* cp for language selectino modal

* language modal setup with several bug fixes also done

* fixed testimonial form translation & height issues

* now added flags

* Bump BUILD_VERSION to 1.1.6

* squashed conflicts

* Bump BUILD_VERSION to 1.1.7

* added caret

* fixed single and no language logic

* bump

* Bump BUILD_VERSION to 1.1.9

* now looks for language only when data is loaded

* removed logs

* optional lang

* Bump BUILD_VERSION to 1.1.10

* made messenger pull from local storage (#347)

* Bump BUILD_VERSION to 1.1.11

* Prevent language override for admin users

This change ensures that the user language parameter is not appended to the API call when the user is an admin. This avoids any conflict or unintended behavior for admin-level operations, enhancing the robustness of language handling in the messaging API.

* Add optional chaining in various string splitting operations

Refactor the code to use optional chaining for string split operations to ensure error prevention on null or undefined values. This change improves the robustness of the code, particularly for scenarios where split might be called on potentially nullable strings.

* Bump BUILD_VERSION to 1.1.12

* in the process of setting up custom loading messages to inform user of unsupported languages

* resolved conflict with chosen language that is not supported by campaign

* separating languages from language obj

* initial box now translates

* about only available from english

* capture weird screen dimensions with media queries

* blanket notification now in approuter

* tighter media query

* eventos

* more date objs translated too

* No preferred language should fallback to english

* Bump BUILD_VERSION to 1.1.13

* Fix: Broken community portal link  (#379)

* Add dynamic URL support for community portal

Updated the COMMUNITY_PORTAL_URL to dynamically generate the base URL depending on the environment. Added a utility function `getCommunityPortalBaseURL` to handle this logic.

* Refactor community portal URL logic

Consolidate community portal URLs into a single `BASE_URL` constant. This change simplifies URL management and reduces redundancy in the codebase. The `getCommunityPortalBaseURL` function has been removed and replaced with a cleaner variable definition.

* Fix incorrect branching condition for production environment

The `if (IS_PROD)` condition has been changed to `else if (IS_PROD)` to ensure it is mutually exclusive with previous conditions. This prevents the production URL assignment from being skipped if a prior condition is satisfied.

* Bump BUILD_VERSION to 1.1.14

* fixed other, and doubly sending user language

* filter instead of map

* fixed "other" on sharing modal

* Bump BUILD_VERSION to 1.1.15

* translated comment section

* news letter trans

* translated a few toasts

* remove logs

* Bump BUILD_VERSION to 1.1.16

* Bump BUILD_VERSION to 1.1.17

* spanish continue

* added the link for volunteering

* manual bump

* Bump BUILD_VERSION to 1.1.19

---------

Co-authored-by: frimpongopoku <[email protected]>
Co-authored-by: Version Update Bot <[email protected]>
Co-authored-by: Tahiru Abdullai <[email protected]>
Co-authored-by: Abdullai Tahiru <[email protected]>
archx3 added a commit that referenced this pull request Sep 4, 2024
* fix: Will now require community selection before subscription

* feat: Add time to one event page & change image on event card to contain

* fix: fallback for formatting

* Fix: Add Notification for Failed Campaign Subscription API Call

* Bump BUILD_VERSION to 1.0.4

* fixed: Fixed date field changine to text

* Bump BUILD_VERSION to 1.0.5

* Bump BUILD_VERSION to 1.0.6

* Bump BUILD_VERSION to 1.0.7

* Fix: address formatting in AddToGoogleCalendar component

The AddToGoogleCalendar component has been updated to correctly format addresses with state information. The state value is now correctly retrieved and appended to the address string, fixing previous issues where the state data was not properly included.

* Fix: address formatting in AddToGoogleCalendar component

The AddToGoogleCalendar component has been updated to correctly format addresses with state information. The state value is now correctly retrieved and appended to the address string, fixing previous issues where the state data was not properly included.

* Bump BUILD_VERSION to 1.0.8

* scraped static texts on all pages

* got text from modals as well

* added common languages offered

* setting up redux for manual language selection

* hooked dropdown to redux data

* feat: lang selection working with dummy data set. Selection persists too

* whole of homepage now depends on static text object

* interactions, comment box, events and testimonial section all looking good

* one testimonial, one events page 🔥

* several changes json object for static text and testing with dummy translations

* language is now automatically added to apiCall

* fixed bug with comment component translation

* more translations, and tweaks to page json structure

* testimonial form now translated too

* getting started with languages offered page

* still setting up multi select on dropdown. checkbox in dropdown is not checking yet

* removing language works locally

* setup admin lang selector and docked it at the top of campaign edit page

* dropdown for language context on admin side now works with admin selected languages

* remove log

* Now changed to toggles

* removed comments and added translation for fallback text

* removed logs

* edited toggles

* add language back in there

* sort languages

* translated more fallback texts

* translated preview mode & events too

* paused on admin tans for now

* removed comments and limited languages

* now loads language list from api

* better config log

* version number bump

* point to dev

* Bump BUILD_VERSION to 1.1.1

* user language

* remove about

* version number resolution

* upgrade

* Bump BUILD_VERSION to 1.1.4

* en-us

* Bump BUILD_VERSION to 1.1.5

* toggling languages works for admins

* client side loads from toggle list

* dont show ribbon when no list is provided

* dash will be provided if only one enabled language

* fix nav issue

* english cant be toggled, several tweaks to frontend logic

* pre testimonial translations setup for homepage area

* translated more dialogs

* resolved some circular imports

* cp for language selectino modal

* language modal setup with several bug fixes also done

* fixed testimonial form translation & height issues

* now added flags

* Bump BUILD_VERSION to 1.1.6

* squashed conflicts

* Bump BUILD_VERSION to 1.1.7

* added caret

* fixed single and no language logic

* bump

* Bump BUILD_VERSION to 1.1.9

* now looks for language only when data is loaded

* removed logs

* optional lang

* Bump BUILD_VERSION to 1.1.10

* made messenger pull from local storage (#347)

* Bump BUILD_VERSION to 1.1.11

* Prevent language override for admin users

This change ensures that the user language parameter is not appended to the API call when the user is an admin. This avoids any conflict or unintended behavior for admin-level operations, enhancing the robustness of language handling in the messaging API.

* Add optional chaining in various string splitting operations

Refactor the code to use optional chaining for string split operations to ensure error prevention on null or undefined values. This change improves the robustness of the code, particularly for scenarios where split might be called on potentially nullable strings.

* Bump BUILD_VERSION to 1.1.12

* Dev -> Canary (#349)

* scraped static texts on all pages

* got text from modals as well

* added common languages offered

* setting up redux for manual language selection

* hooked dropdown to redux data

* feat: lang selection working with dummy data set. Selection persists too

* whole of homepage now depends on static text object

* interactions, comment box, events and testimonial section all looking good

* one testimonial, one events page 🔥

* several changes json object for static text and testing with dummy translations

* language is now automatically added to apiCall

* fixed bug with comment component translation

* more translations, and tweaks to page json structure

* testimonial form now translated too

* getting started with languages offered page

* still setting up multi select on dropdown. checkbox in dropdown is not checking yet

* removing language works locally

* setup admin lang selector and docked it at the top of campaign edit page

* dropdown for language context on admin side now works with admin selected languages

* remove log

* Now changed to toggles

* removed comments and added translation for fallback text

* removed logs

* edited toggles

* add language back in there

* sort languages

* translated more fallback texts

* translated preview mode & events too

* paused on admin tans for now

* removed comments and limited languages

* now loads language list from api

* better config log

* version number bump

* point to dev

* Bump BUILD_VERSION to 1.1.1

* user language

* remove about

* version number resolution

* upgrade

* Bump BUILD_VERSION to 1.1.4

* en-us

* Bump BUILD_VERSION to 1.1.5

* toggling languages works for admins

* client side loads from toggle list

* dont show ribbon when no list is provided

* dash will be provided if only one enabled language

* fix nav issue

* english cant be toggled, several tweaks to frontend logic

* pre testimonial translations setup for homepage area

* translated more dialogs

* resolved some circular imports

* cp for language selectino modal

* language modal setup with several bug fixes also done

* fixed testimonial form translation & height issues

* now added flags

* Bump BUILD_VERSION to 1.1.6

* squashed conflicts

* Bump BUILD_VERSION to 1.1.7

* added caret

* fixed single and no language logic

* bump

* Bump BUILD_VERSION to 1.1.9

* now looks for language only when data is loaded

* removed logs

* optional lang

* Bump BUILD_VERSION to 1.1.10

* made messenger pull from local storage (#347)

* Bump BUILD_VERSION to 1.1.11

* Prevent language override for admin users

This change ensures that the user language parameter is not appended to the API call when the user is an admin. This avoids any conflict or unintended behavior for admin-level operations, enhancing the robustness of language handling in the messaging API.

* Add optional chaining in various string splitting operations

Refactor the code to use optional chaining for string split operations to ensure error prevention on null or undefined values. This change improves the robustness of the code, particularly for scenarios where split might be called on potentially nullable strings.

* Bump BUILD_VERSION to 1.1.12

---------

Co-authored-by: Version Update Bot <[email protected]>
Co-authored-by: Tahiru Abdullai <[email protected]>

* in the process of setting up custom loading messages to inform user of unsupported languages

* resolved conflict with chosen language that is not supported by campaign

* separating languages from language obj

* initial box now translates

* about only available from english

* capture weird screen dimensions with media queries

* blanket notification now in approuter

* tighter media query

* eventos

* more date objs translated too

* No preferred language should fallback to english

* Bump BUILD_VERSION to 1.1.13

* Fix: Broken community portal link  (#379)

* Add dynamic URL support for community portal

Updated the COMMUNITY_PORTAL_URL to dynamically generate the base URL depending on the environment. Added a utility function `getCommunityPortalBaseURL` to handle this logic.

* Refactor community portal URL logic

Consolidate community portal URLs into a single `BASE_URL` constant. This change simplifies URL management and reduces redundancy in the codebase. The `getCommunityPortalBaseURL` function has been removed and replaced with a cleaner variable definition.

* Fix incorrect branching condition for production environment

The `if (IS_PROD)` condition has been changed to `else if (IS_PROD)` to ensure it is mutually exclusive with previous conditions. This prevents the production URL assignment from being skipped if a prior condition is satisfied.

* Bump BUILD_VERSION to 1.1.14

* fixed other, and doubly sending user language

* filter instead of map

* fixed "other" on sharing modal

* Bump BUILD_VERSION to 1.1.15

* translated comment section

* news letter trans

* translated a few toasts

* remove logs

* Bump BUILD_VERSION to 1.1.16

* Bump BUILD_VERSION to 1.1.17

* spanish continue

* added the link for volunteering

* manual bump

* Bump BUILD_VERSION to 1.1.19

* Dev -> Canary (#384)

* scraped static texts on all pages

* got text from modals as well

* added common languages offered

* setting up redux for manual language selection

* hooked dropdown to redux data

* feat: lang selection working with dummy data set. Selection persists too

* whole of homepage now depends on static text object

* interactions, comment box, events and testimonial section all looking good

* one testimonial, one events page 🔥

* several changes json object for static text and testing with dummy translations

* language is now automatically added to apiCall

* fixed bug with comment component translation

* more translations, and tweaks to page json structure

* testimonial form now translated too

* getting started with languages offered page

* still setting up multi select on dropdown. checkbox in dropdown is not checking yet

* removing language works locally

* setup admin lang selector and docked it at the top of campaign edit page

* dropdown for language context on admin side now works with admin selected languages

* remove log

* Now changed to toggles

* removed comments and added translation for fallback text

* removed logs

* edited toggles

* add language back in there

* sort languages

* translated more fallback texts

* translated preview mode & events too

* paused on admin tans for now

* removed comments and limited languages

* now loads language list from api

* better config log

* version number bump

* point to dev

* Bump BUILD_VERSION to 1.1.1

* user language

* remove about

* version number resolution

* upgrade

* Bump BUILD_VERSION to 1.1.4

* en-us

* Bump BUILD_VERSION to 1.1.5

* toggling languages works for admins

* client side loads from toggle list

* dont show ribbon when no list is provided

* dash will be provided if only one enabled language

* fix nav issue

* english cant be toggled, several tweaks to frontend logic

* pre testimonial translations setup for homepage area

* translated more dialogs

* resolved some circular imports

* cp for language selectino modal

* language modal setup with several bug fixes also done

* fixed testimonial form translation & height issues

* now added flags

* Bump BUILD_VERSION to 1.1.6

* squashed conflicts

* Bump BUILD_VERSION to 1.1.7

* added caret

* fixed single and no language logic

* bump

* Bump BUILD_VERSION to 1.1.9

* now looks for language only when data is loaded

* removed logs

* optional lang

* Bump BUILD_VERSION to 1.1.10

* made messenger pull from local storage (#347)

* Bump BUILD_VERSION to 1.1.11

* Prevent language override for admin users

This change ensures that the user language parameter is not appended to the API call when the user is an admin. This avoids any conflict or unintended behavior for admin-level operations, enhancing the robustness of language handling in the messaging API.

* Add optional chaining in various string splitting operations

Refactor the code to use optional chaining for string split operations to ensure error prevention on null or undefined values. This change improves the robustness of the code, particularly for scenarios where split might be called on potentially nullable strings.

* Bump BUILD_VERSION to 1.1.12

* in the process of setting up custom loading messages to inform user of unsupported languages

* resolved conflict with chosen language that is not supported by campaign

* separating languages from language obj

* initial box now translates

* about only available from english

* capture weird screen dimensions with media queries

* blanket notification now in approuter

* tighter media query

* eventos

* more date objs translated too

* No preferred language should fallback to english

* Bump BUILD_VERSION to 1.1.13

* Fix: Broken community portal link  (#379)

* Add dynamic URL support for community portal

Updated the COMMUNITY_PORTAL_URL to dynamically generate the base URL depending on the environment. Added a utility function `getCommunityPortalBaseURL` to handle this logic.

* Refactor community portal URL logic

Consolidate community portal URLs into a single `BASE_URL` constant. This change simplifies URL management and reduces redundancy in the codebase. The `getCommunityPortalBaseURL` function has been removed and replaced with a cleaner variable definition.

* Fix incorrect branching condition for production environment

The `if (IS_PROD)` condition has been changed to `else if (IS_PROD)` to ensure it is mutually exclusive with previous conditions. This prevents the production URL assignment from being skipped if a prior condition is satisfied.

* Bump BUILD_VERSION to 1.1.14

* fixed other, and doubly sending user language

* filter instead of map

* fixed "other" on sharing modal

* Bump BUILD_VERSION to 1.1.15

* translated comment section

* news letter trans

* translated a few toasts

* remove logs

* Bump BUILD_VERSION to 1.1.16

* Bump BUILD_VERSION to 1.1.17

* spanish continue

* added the link for volunteering

* manual bump

* Bump BUILD_VERSION to 1.1.19

---------

Co-authored-by: frimpongopoku <[email protected]>
Co-authored-by: Version Update Bot <[email protected]>
Co-authored-by: Tahiru Abdullai <[email protected]>
Co-authored-by: Abdullai Tahiru <[email protected]>

* fix: Static texts translation (#385)

* Add notification messages and headers to multiple languages

Included success and error notifications for testimonials and comments in English, Spanish, Portuguese, and French. Added new headers for sections such as "Newsletter," "Getting Started," and "Meet the Coaches" across all supported languages.

* Update coach section title to include static text

Modified the `CoachesSectionWithFilters` component to display the `staticT?.title` in the section title if customization is not available. This ensures a default title is shown even if customization data is missing.

* Use static text variables for user notifications

Replaced hardcoded text strings with static text variables in both CommentComponentForModal.js and Footer.js to improve maintainability and support for internationalization. This ensures that all user-facing text can be easily managed and translated as needed.

* Enhance localization support with static text integration

Improved localization by integrating static text placeholders across multiple pages. This includes adjustments to trigger functions, form notifications, and section titles to utilize static text sources when available.

* Update user testimonial formatting

Modified the format for displaying the user's company name in testimonials to include a static translation key. This ensures the word 'from' can be localized correctly based on user settings.

* Remove TODO comment in Footer.js

Eliminated an outdated TODO comment related to translation help text in the footer component. This will improve code readability and reduce unnecessary clutter.

* Update text property access in components

Modified `CoachesSectionWithFilters.js` and `Footer.js` to access the `text` property of nested objects in the `title` and `description` fields. This ensures the correct text is displayed based on the provided customization or static data.

* Refactor JSON statics structure to improve consistency

Updated the internationalization JSON structure to nest titles and descriptions under 'text' keys. This change ensures a consistent format across multiple sections and languages, enhancing maintainability and readability of the code. Adjusted relevant component render logic to accommodate this new structure.

* Bump BUILD_VERSION to 1.1.20

* Fix static text translation (#386)

* Add notification messages and headers to multiple languages

Included success and error notifications for testimonials and comments in English, Spanish, Portuguese, and French. Added new headers for sections such as "Newsletter," "Getting Started," and "Meet the Coaches" across all supported languages.

* Update coach section title to include static text

Modified the `CoachesSectionWithFilters` component to display the `staticT?.title` in the section title if customization is not available. This ensures a default title is shown even if customization data is missing.

* Use static text variables for user notifications

Replaced hardcoded text strings with static text variables in both CommentComponentForModal.js and Footer.js to improve maintainability and support for internationalization. This ensures that all user-facing text can be easily managed and translated as needed.

* Enhance localization support with static text integration

Improved localization by integrating static text placeholders across multiple pages. This includes adjustments to trigger functions, form notifications, and section titles to utilize static text sources when available.

* Update user testimonial formatting

Modified the format for displaying the user's company name in testimonials to include a static translation key. This ensures the word 'from' can be localized correctly based on user settings.

* Remove TODO comment in Footer.js

Eliminated an outdated TODO comment related to translation help text in the footer component. This will improve code readability and reduce unnecessary clutter.

* Update text property access in components

Modified `CoachesSectionWithFilters.js` and `Footer.js` to access the `text` property of nested objects in the `title` and `description` fields. This ensures the correct text is displayed based on the provided customization or static data.

* Refactor JSON statics structure to improve consistency

Updated the internationalization JSON structure to nest titles and descriptions under 'text' keys. This change ensures a consistent format across multiple sections and languages, enhancing maintainability and readability of the code. Adjusted relevant component render logic to accommodate this new structure.

* Fix comment box trigger in TechnologyFullViewPage

Added a second parameter to the triggerCommentBox function to ensure the modal's static texts are passed correctly. This resolves an issue where the comment box was not displaying all necessary information.

* Bump BUILD_VERSION to 1.1.21

* Add Spanish and Portuguese translations to internationalization

This commit enhances the internationalization feature by adding Spanish and Portuguese translations to various UI elements. These translations cover toasts, forms, loaders, footers, modals, pages, and interactions, enabling a wider audience reach and improving user experience.

* language selector will not show in PROD (#388)

---------

Co-authored-by: frimpongopoku <[email protected]>
Co-authored-by: Tahiru Abdullai <[email protected]>
Co-authored-by: Abdullai Tahiru <[email protected]>
Co-authored-by: Version Update Bot <[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
2 participants