Skip to content

Commit

Permalink
Updating to NEW COLOR SCHEME 2 (#3293)
Browse files Browse the repository at this point in the history
* changed green to blue

* updated funds section

* people section css updated

* updated Tags section

* venues, action items, advertisments, plugins sections updated

* fixed code coverage test

* fixed code coverage test

* CSS methodology added

* fixed linting

---------

Co-authored-by: Rahul Chougule <[email protected]>
  • Loading branch information
rahulch07 and rahul-fl authored Jan 16, 2025
1 parent e922a02 commit 82214d9
Show file tree
Hide file tree
Showing 34 changed files with 662 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/assets/css/app.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions src/components/AddOn/core/AddOnEntry/AddOnEntry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,23 @@ interface InterfaceAddOnEntryProps {
* getInstalledPlugins={() => {}}
* />
* ```
* ## CSS Strategy Explanation:
*
* To ensure consistency across the application and reduce duplication, common styles
* (such as button styles) have been moved to the global CSS file. Instead of using
* component-specific classes (e.g., `.greenregbtnOrganizationFundCampaign`, `.greenregbtnPledge`), a single reusable
* class (e.g., .addButton) is now applied.
*
* ### Benefits:
* - **Reduces redundant CSS code.
* - **Improves maintainability by centralizing common styles.
* - **Ensures consistent styling across components.
*
* ### Global CSS Classes used:
* - `.addButton`
* - `.removeButton`
*
* For more details on the reusable classes, refer to the global CSS file.
*/
function addOnEntry({
id,
Expand Down
25 changes: 23 additions & 2 deletions src/components/AddPeopleToTag/AddPeopleToTag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,30 @@ import { useTranslation } from 'react-i18next';
import InfiniteScrollLoader from 'components/InfiniteScrollLoader/InfiniteScrollLoader';
import type { TFunction } from 'i18next';

/**
* Props for the `AddPeopleToTag` component.
/** * Props for the `AddPeopleToTag` component.
*
* ## CSS Strategy Explanation:
*
* To ensure consistency across the application and reduce duplication, common styles
* (such as button styles) have been moved to the global CSS file. Instead of using
* component-specific classes (e.g., `.greenregbtnOrganizationFundCampaign`, `.greenregbtnPledge`), a single reusable
* class (e.g., .addButton) is now applied.
*
* ### Benefits:
* - **Reduces redundant CSS code.
* - **Improves maintainability by centralizing common styles.
* - **Ensures consistent styling across components.
*
* ### Global CSS Classes used:
* - `.editButton`
* - `.modalHeader`
* - `.inputField`
* - `.addButton`
* - `.removeButton`
*
* For more details on the reusable classes, refer to the global CSS file.
*/

export interface InterfaceAddPeopleToTagProps {
addPeopleToTagModalIsOpen: boolean;
hideAddPeopleToTagModal: () => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,24 @@ interface InterfaceAddOnEntryProps {
*
* @param props - Component properties
* @returns The rendered component
*
* ## CSS Strategy Explanation:
*
* To ensure consistency across the application and reduce duplication, common styles
* (such as button styles) have been moved to the global CSS file. Instead of using
* component-specific classes (e.g., `.greenregbtnOrganizationFundCampaign`, `.greenregbtnPledge`), a single reusable
* class (e.g., .addButton) is now applied.
*
* ### Benefits:
* - **Reduces redundant CSS code.
* - **Improves maintainability by centralizing common styles.
* - **Ensures consistent styling across components.
*
* ### Global CSS Classes used:
* - `.addButton`
* - `.removeButton`
*
* For more details on the reusable classes, refer to the global CSS file.
*/
function AdvertisementEntry({
id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,25 @@ import { useParams } from 'react-router-dom';

/**
* Props for the `advertisementRegister` component.
*
* ## CSS Strategy Explanation:
*
* To ensure consistency across the application and reduce duplication, common styles
* (such as button styles) have been moved to the global CSS file. Instead of using
* component-specific classes (e.g., `.greenregbtnOrganizationFundCampaign`, `.greenregbtnPledge`), a single reusable
* class (e.g., .addButton) is now applied.
*
* ### Benefits:
* - **Reduces redundant CSS code.
* - **Improves maintainability by centralizing common styles.
* - **Ensures consistent styling across components.
*
* ### Global CSS Classes used:
* - `.dropdown`
* - `.inputField`
* - `.removeButton`
*
* For more details on the reusable classes, refer to the global CSS file.
*/
interface InterfaceAddOnRegisterProps {
id?: string; // Optional organization ID
Expand Down
20 changes: 20 additions & 0 deletions src/components/EventCalendar/EventCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,26 @@ import HolidayCard from '../HolidayCards/HolidayCard';
import { holidays, months, weekdays } from './constants';
import type { InterfaceRecurrenceRule } from 'utils/recurrenceUtils';
import YearlyEventCalender from './YearlyEventCalender';

/**
* ## CSS Strategy Explanation:
*
* To ensure consistency across the application and reduce duplication, common styles
* (such as button styles) have been moved to the global CSS file. Instead of using
* component-specific classes (e.g., `.greenregbtnOrganizationFundCampaign`, `.greenregbtnPledge`), a single reusable
* class (e.g., .addButton) is now applied.
*
* ### Benefits:
* - **Reduces redundant CSS code.
* - **Improves maintainability by centralizing common styles.
* - **Ensures consistent styling across components.
*
* ### Global CSS Classes used:
* - `.editButton`
*
* For more details on the reusable classes, refer to the global CSS file.
*/

interface InterfaceEventListCardProps {
userRole?: string;
key?: string;
Expand Down
17 changes: 17 additions & 0 deletions src/components/EventCalendar/EventHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,23 @@ interface InterfaceEventHeaderProps {
* @param handleChangeView - Function to handle changing the view type.
* @param showInviteModal - Function to show the invite modal for creating an event.
* @returns JSX.Element - The rendered EventHeader component.
*
* ## CSS Strategy Explanation:
*
* To ensure consistency across the application and reduce duplication, common styles
* (such as button styles) have been moved to the global CSS file. Instead of using
* component-specific classes (e.g., `.greenregbtnOrganizationFundCampaign`, `.greenregbtnPledge`), a single reusable
* class (e.g., .addButton) is now applied.
*
* ### Benefits:
* - **Reduces redundant CSS code.
* - **Improves maintainability by centralizing common styles.
* - **Ensures consistent styling across components.
*
* ### Global CSS Classes used:
* - `.dropdown`
*
* For more details on the reusable classes, refer to the global CSS file.
*/
function eventHeader({
viewType,
Expand Down
21 changes: 21 additions & 0 deletions src/components/EventListCard/EventListCardModals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,27 @@ enum Role {
* Converts a time string to a Dayjs object representing the current date with the specified time.
* @param time - A string representing the time in 'HH:mm:ss' format.
* @returns A Dayjs object with the current date and specified time.
*
* ## CSS Strategy Explanation:
*
* To ensure consistency across the application and reduce duplication, common styles
* (such as button styles) have been moved to the global CSS file. Instead of using
* component-specific classes (e.g., `.greenregbtnOrganizationFundCampaign`, `.greenregbtnPledge`), a single reusable
* class (e.g., .addButton) is now applied.
*
* ### Benefits:
* - **Reduces redundant CSS code.
* - **Improves maintainability by centralizing common styles.
* - **Ensures consistent styling across components.
*
* ### Global CSS Classes used:
* - `.inputField`
* - `.switch`
* - `.addButton`
* - `.removeButton`
* - `.modalHeader`
*
* For more details on the reusable classes, refer to the global CSS file.
*/
const timeToDayJs = (time: string): Dayjs => {
const dateTimeString = dayjs().format('YYYY-MM-DD') + ' ' + time;
Expand Down
17 changes: 17 additions & 0 deletions src/components/OrgPeopleListCard/OrgPeopleListCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,23 @@ import { Close } from '@mui/icons-material';

/**
* Props for the OrgPeopleListCard component
*
* ## CSS Strategy Explanation:
*
* To ensure consistency across the application and reduce duplication, common styles
* (such as button styles) have been moved to the global CSS file. Instead of using
* component-specific classes (e.g., `.greenregbtnOrganizationFundCampaign`, `.greenregbtnPledge`), a single reusable
* class (e.g., .addButton) is now applied.
*
* ### Benefits:
* - **Reduces redundant CSS code.
* - **Improves maintainability by centralizing common styles.
* - **Ensures consistent styling across components.
*
* ### Global CSS Classes used:
* - `.regularBtn`
*
* For more details on the reusable classes, refer to the global CSS file.
*/
interface InterfaceOrgPeopleListCardProps {
id: string | undefined;
Expand Down
17 changes: 17 additions & 0 deletions src/components/OrgPostCard/DeletePostModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@ import styles from '../../style/app.module.css';
* @param onHide - Callback invoked when the modal is dismissed.
* @param onDelete - Callback invoked to actually delete the post.
* @returns A rendered React Bootstrap Modal for post deletion.
*
* ## CSS Strategy Explanation:
*
* To ensure consistency across the application and reduce duplication, common styles
* (such as button styles) have been moved to the global CSS file. Instead of using
* component-specific classes (e.g., `.greenregbtnOrganizationFundCampaign`, `.greenregbtnPledge`), a single reusable
* class (e.g., .addButton) is now applied.
*
* ### Benefits:
* - **Reduces redundant CSS code.
* - **Improves maintainability by centralizing common styles.
* - **Ensures consistent styling across components.
*
* ### Global CSS Classes used:
* - `.addButton`
*
* For more details on the reusable classes, refer to the global CSS file.
*/

interface InterfaceDeletePostModalProps {
Expand Down
24 changes: 24 additions & 0 deletions src/components/OrgPostCard/OrgPostCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,30 @@ import { errorHandler } from 'utils/errorHandler';
import type { InterfacePostForm } from 'utils/interfaces';
import styles from '../../style/app.module.css';
import DeletePostModal from './DeletePostModal';

/**
*
* ## CSS Strategy Explanation:
*
* To ensure consistency across the application and reduce duplication, common styles
* (such as button styles) have been moved to the global CSS file. Instead of using
* component-specific classes (e.g., `.greenregbtnOrganizationFundCampaign`, `.greenregbtnPledge`), a single reusable
* class (e.g., .addButton) is now applied.
*
* ### Benefits:
* - **Reduces redundant CSS code.
* - **Improves maintainability by centralizing common styles.
* - **Ensures consistent styling across components.
*
* ### Global CSS Classes used:
* - `.modalHeader`
* - `.inputField`
* - `.removeButton`
* - `.addButton`
*
* For more details on the reusable classes, refer to the global CSS file.
*/

interface InterfaceOrgPostCardProps {
postID: string;
id: string;
Expand Down
20 changes: 20 additions & 0 deletions src/components/TagActions/TagActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,26 @@ interface InterfaceUserTagsAncestorData {

/**
* Props for the `AssignToTags` component.
*
* ## CSS Strategy Explanation:
*
* To ensure consistency across the application and reduce duplication, common styles
* (such as button styles) have been moved to the global CSS file. Instead of using
* component-specific classes (e.g., `.greenregbtnOrganizationFundCampaign`, `.greenregbtnPledge`), a single reusable
* class (e.g., .addButton) is now applied.
*
* ### Benefits:
* - **Reduces redundant CSS code.
* - **Improves maintainability by centralizing common styles.
* - **Ensures consistent styling across components.
*
* ### Global CSS Classes used:
* - `.modalHeader`
* - `.inputField`
* - `.removeButton`
* - `.addButton`
*
* For more details on the reusable classes, refer to the global CSS file.
*/
export interface InterfaceTagActionsProps {
tagActionsModalIsOpen: boolean;
Expand Down
16 changes: 16 additions & 0 deletions src/components/TagActions/TagNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@ import type { TFunction } from 'i18next';

/**
* Props for the `TagNode` component.
*
* ## CSS Strategy Explanation:
*
* To ensure consistency across the application and reduce duplication, common styles
* (such as button styles) have been moved to the global CSS file. Instead of using
* component-specific classes (e.g., `.greenregbtnOrganizationFundCampaign`, `.greenregbtnPledge`), a single reusable
* class (e.g., .addButton) is now applied.
*
* ### Benefits:
* - **Reduces redundant CSS code.
* - **Improves maintainability by centralizing common styles.
* - **Ensures consistent styling across components.
*
* ### Global CSS Classes used:
*
* For more details on the reusable classes, refer to the global CSS file.
*/
interface InterfaceTagNodeProps {
tag: InterfaceTagData;
Expand Down
18 changes: 18 additions & 0 deletions src/components/Venues/VenueCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,24 @@ interface InterfaceVenueCardProps {
* handleDelete={handleDeleteVenue}
* />
* ```
*
* ## CSS Strategy Explanation:
*
* To ensure consistency across the application and reduce duplication, common styles
* (such as button styles) have been moved to the global CSS file. Instead of using
* component-specific classes (e.g., `.greenregbtnOrganizationFundCampaign`, `.greenregbtnPledge`), a single reusable
* class (e.g., .addButton) is now applied.
*
* ### Benefits:
* - **Reduces redundant CSS code.
* - **Improves maintainability by centralizing common styles.
* - **Ensures consistent styling across components.
*
* ### Global CSS Classes used:
* - `.addButton`
* - `.removeButton`
*
* For more details on the reusable classes, refer to the global CSS file.
*/
const VenueCard = ({
venueItem,
Expand Down
17 changes: 17 additions & 0 deletions src/components/Venues/VenueModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,23 @@ export interface InterfaceVenueModalProps {
* @param edit - A flag indicating if the modal is in edit mode. If true, the component will update an existing venue; if false, it will create a new one.
*
* @returns The rendered modal component.
*
* ## CSS Strategy Explanation:
*
* To ensure consistency across the application and reduce duplication, common styles
* (such as button styles) have been moved to the global CSS file. Instead of using
* component-specific classes (e.g., `.greenregbtnOrganizationFundCampaign`, `.greenregbtnPledge`), a single reusable
* class (e.g., .addButton) is now applied.
*
* ### Benefits:
* - **Reduces redundant CSS code.
* - **Improves maintainability by centralizing common styles.
* - **Ensures consistent styling across components.
*
* ### Global CSS Classes used:
* - `.inputField`
*
* For more details on the reusable classes, refer to the global CSS file.
*/
const VenueModal = ({
show,
Expand Down
Loading

0 comments on commit 82214d9

Please sign in to comment.