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

Add Custom Fonts (Font Family, Font Size, Chats Line Height, Letter Spacing) #22

Closed
14 tasks done
itsmartashub opened this issue May 27, 2024 · 0 comments · Fixed by #24 or #26
Closed
14 tasks done

Add Custom Fonts (Font Family, Font Size, Chats Line Height, Letter Spacing) #22

itsmartashub opened this issue May 27, 2024 · 0 comments · Fixed by #24 or #26
Assignees
Labels
Feature A proposal for a new feature or an enhancement Status: WIP Work In Progress

Comments

@itsmartashub
Copy link
Owner

itsmartashub commented May 27, 2024

Enhance user experience and customization by enabling users to select custom fonts, including font family and size. Based on user feedback on social media, there are users who are not happy with the new ChatGPT font changes.

Tasks:

  • Add a new section in the GPThemes settings or customization options titled Font Styles or just Fonts
  • Add dropdown menu for users to select their preferred font family from a list of available options (e.g., Roboto, Inter, Poppins etc)
  • Add an number input field for users to specify their desired font size in px (convert this to rem and vice-versa)
  • Convert font-size px value from number input to rem and vice-versa
  • Add an number input field for users to specify their desired line heghts in chats
  • Add an number input field for users to specify their desired letter spacing
  • Apply desired option live and immediately This is removed. Changes are applied when the user unfocus the field.
  • Fetch the fonts from Google Fonts by inserting the <link> in the <head> with the preferred fonts.
  • ! To ensure that there is no duplication of links injected in the head, first check if the desired Google Font has already been fetched. If the font has not been fetched, inject the necessary <link>, otherwise, skip the injection process. This will help maintain a clean and efficient code structure, while also improving performance by preventing unnecessary font fetching, thus minimizing spamming of requests.
  • Store the user's font preferences in their local storage to ensure that the selected fonts are applied consistently across the platform
  • Include a Reset to default option for users who wish to revert to the original font settings (reset all in once, or maybe add reset by each property)
  • Validate input fields to make sure they're not empty or not x>min and x<max
  • Display the errors when input values are wrong
  • Handle the values when there is an error...
@itsmartashub itsmartashub self-assigned this May 27, 2024
@itsmartashub itsmartashub added Feature A proposal for a new feature or an enhancement Status: WIP Work In Progress labels May 27, 2024
@itsmartashub itsmartashub changed the title Add Custom Fonts (Font Family, Font Size, Font Weight) Add Custom Fonts (Font Family, Font Size) May 28, 2024
itsmartashub added a commit that referenced this issue May 28, 2024
- Add a new section titled "Font Styles" or simply "Fonts" in the GPThemes customization settings, providing users with extended font customization options.

Changes summary:
- Introduced a dedicated "Font Styles" or "Fonts" section within the GPThemes customization settings, empowering users to personalize various font aspects, such as style, size, and family, to align with their preferences and enhance readability.
itsmartashub added a commit that referenced this issue May 28, 2024
…#22

- Add the logic for "Apply Fonts" and "Reset Fonts" functionality, allowing users to preview and reset their font customization choices.

Changes summary:
- Implemented the ability for users to apply and reset font customizations, providing a dynamic preview of their font choices and the option to revert to default settings if desired.
itsmartashub added a commit that referenced this issue May 28, 2024
…`<link>` #22

- Fetch custom fonts from Google Fonts by dynamically inserting the `<link>` tag in the `<head>` section, ensuring efficient font loading and improving performance.

Changes summary:
- Introduced dynamic font loading by fetching custom fonts from Google Fonts, providing users with a broader range of font options to personalize their experience with the extension.
itsmartashub added a commit that referenced this issue May 28, 2024
…er's font preferences in their local storage #22

- Implement the necessary logic to set and retrieve user font preferences from browser storage, ensuring consistent font application across the platform.

Changes summary:
- Added the ability to store and retrieve user font preferences in browser storage, providing persistence and ensuring that the selected fonts are retained and applied consistently across different devices and browser sessions.
itsmartashub added a commit that referenced this issue May 28, 2024
…spamming #22

- Optimize the Google Fonts fetching logic by checking if the desired font has already been fetched before injecting the `<link>` tag.
- Prevent unnecessary fetching and minimize request spamming by skipping the injection process for already fetched fonts.

Changes summary:
- Improved the efficiency of Google Fonts fetching by checking for previously fetched fonts before injecting new `<link>` tags, resulting in reduced code duplication and improved performance.
@itsmartashub itsmartashub changed the title Add Custom Fonts (Font Family, Font Size) Add Custom Fonts (Font Family, Font Size, Chats Line Height, Letter Spacing) May 29, 2024
@itsmartashub itsmartashub pinned this issue Jun 4, 2024
This was linked to pull requests Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature A proposal for a new feature or an enhancement Status: WIP Work In Progress
Projects
None yet
1 participant