-
Notifications
You must be signed in to change notification settings - Fork 36
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
refactor: ui and texts minor enhancements #517
base: next
Are you sure you want to change the base?
refactor: ui and texts minor enhancements #517
Conversation
- Updated `finance-quick-transfer-modal.tsx` to use `value` as a fallback if `amount` is not greater than 0. - Ensures accurate MMC amount is displayed in the transfer message.
- **`profile-header.tsx`**: Removed direct usage of `ProfileTransfer` and its transfer button for other user profiles. - **`profile-transfer.tsx`**: Introduced tooltip behavior and additional UI improvements for the transfer button. Enhanced interactivity with popovers and streamlined styling. - **`profile-toolbar.tsx`**: Re-integrated `ProfileTransfer` component for authenticated sessions in the updated toolbar context. These changes improve the usability and accessibility of profile transfer actions while refining the user interface and overall experience.
- Updated `finance-display-profile-info.tsx` to include a `fontSize` style of `1.3rem` for the profile display name. - Ensures improved readability for profile names in 'profile' mode.
- Introduced `trimPublicationContentExtraText` in `src/utils/text-transform.ts`. This utility trims text based on specific special characters. - Updated `publication-details-view.tsx` to utilize this trimming utility when rendering publication content with Markdown.
Quality Gate passedIssues Measures |
|
||
// If none of the special characters are found, return the original text | ||
return text; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now, if a special character appears at the beginning or in the middle of the description, the entire text (or a large portion of it) might get removed. Could we avoid this by splitting the logic? Maybe we could have one function that removes only specific characters and uncommon words from an array, and another one dedicated to removing emails. This way, we reduce the risk of losing relevant information.
This pull request includes several changes across different sections of the codebase, focusing on enhancing UI components, improving text processing, and refactoring code for better usability. The most important changes include updates to the
ProfileTransfer
component, modifications to thePublicationDetailsView
, and adjustments to theFinanceQuickTransferModal
.UI Enhancements:
src/sections/user/profile-transfer.tsx
: Enhanced theProfileTransfer
component by adding a tooltip and improving the button styling. [1] [2]src/sections/user/profile-toolbar.tsx
: Moved theProfileTransfer
component to the toolbar for better accessibility. [1] [2]Text Processing Improvements:
src/utils/text-transform.ts
: Added a new functiontrimPublicationContentExtraText
to trim additional content from publication strings based on specific special characters.src/sections/publication/view/publication-details-view.tsx
: Updated thePublicationDetailsView
to use the newtrimPublicationContentExtraText
function for processing publication content. [1] [2]Finance Component Updates:
src/sections/finance/components/finance-quick-transfer-modal.tsx
: Modified therawDescription
to handle both positive and non-positive amounts correctly.src/sections/finance/components/finance-display-profile-info.tsx
: Adjusted the font size for the profile display name in theFinanceDisplayProfileInfo
component.Code Refactoring:
src/sections/user/profile-header.tsx
: Removed theProfileTransfer
component from the profile header to streamline the UI. [1] [2]