-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Completed preliminary re-factor of Notification Component: re-worked CSS, provided for more modular actions, created new timestamp, badge and text truncation features, allowed for inline vs not-inline functionality, updated stories * Commented out failing Notification tests to re-work in second PR * Added temporary test to quiet test suite error until new tests written in PR 2 * Added missing CSS style * Update src/components/Notification/Notification.tsx Include default value for `navigator` object Co-authored-by: JoeS <55896546+joe-s-avaya@users.noreply.github.com> * Switched inline styles out for class name * Commiting changes in progress in order to switch to previous branch * Changed font size and color for timestamp, used Neo typography classes for same * Picke up design feedback on PR * Changed variable name as per feedback * Continued re-building Notification Component - updated tests, added logic for improved text truncation, added aria-label translations * Ran yarn all * Ran yarn all * Restored use of PopUpManager, re-factored truncation logic to fix issues w/ using PopUpManager and description text wrapping, picked up misc. feedback suggestions * Re-factored truncation behavior to avoid unnecessary dependencies in Component, added Tooltip to Badge, fixed bug in truncation behavior * Allowed for default/custom width in PopUpManager * Removed console.logs, renamed function for clarity * git doesn't like changing capitalization of file names * Fixed missing logic in textWidth function --------- Co-authored-by: JoeS <55896546+joe-s-avaya@users.noreply.github.com>
- Loading branch information
1 parent
7551994
commit 7d15726
Showing
18 changed files
with
638 additions
and
462 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
src/components/Notification/Actions/ButtonAction/SecondaryButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
export type CounterActionProps = { count: string }; | ||
export const CounterAction = ({ count }: CounterActionProps) => { | ||
return <div className="neo-notification__counter">{count}</div>; | ||
return ( | ||
<div className="neo-notification__counter" aria-label={count}> | ||
{count} | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./translations"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export interface INotificationTranslations { | ||
icon: string; | ||
badge: string; | ||
textTruncation: string; | ||
closeAction: string; | ||
counterAction: string; | ||
} | ||
|
||
export const defaultTranslations: INotificationTranslations = { | ||
icon: "icon", | ||
badge: "Badge representing number of times notification has occured: ", | ||
textTruncation: "Expand/collapse", | ||
closeAction: "Close notification", | ||
counterAction: "Counter: ", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.