Skip to content

feat: self host google fonts#22129

Merged
trishaanand merged 27 commits intoreleasefrom
feat/bundle-fonts
Apr 13, 2023
Merged

feat: self host google fonts#22129
trishaanand merged 27 commits intoreleasefrom
feat/bundle-fonts

Conversation

@berzerkeer
Copy link
Contributor

@berzerkeer berzerkeer commented Apr 5, 2023

Description

22005

  • An air-gapped instance most likely can't communicate to the public internet, relying on google to load fonts is not possible.
  • So, this PR downloads and the required fonts on our local and serve them to the browser locally.

Fixes #22005
Fixes #22060

if no issue exists, please create an issue and ask the maintainers about this first

Media

A video or a GIF is preferred. when using Loom, don’t embed because it looks like it’s a GIF. instead, just link to the video

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Manual

Checklist:

Dev activity

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • PR is being merged under a feature flag

QA activity:

  • Test plan has been approved by relevant developers
  • Test plan has been peer reviewed by QA
  • Cypress test cases have been added and approved by either SDET or manual QA
  • Organized project review call with relevant stakeholders after Round 1/2 of QA
  • Added Test Plan Approved label after reveiwing all Cypress test

@berzerkeer berzerkeer changed the base branch from release to feat/airgap-image-bundle April 5, 2023 09:22
@berzerkeer berzerkeer requested a review from jsartisan April 5, 2023 09:23
@berzerkeer berzerkeer self-assigned this Apr 5, 2023
@github-actions github-actions bot added the Enhancement New feature or request label Apr 5, 2023
@jsartisan
Copy link
Contributor

/ok-to-test sha=efe7c48

@github-actions
Copy link

github-actions bot commented Apr 6, 2023

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/4625640911.
Workflow: Appsmith External Integration Test Workflow.
Commit: efe7c48.
PR: 22129.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=22129&runId=4625640911_1

@github-actions
Copy link

github-actions bot commented Apr 6, 2023

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/4625640911.
Commit: efe7c48.
The following are new failures, please fix them before merging the PR:

  1. cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/GitSyncedApps_spec.js

  2. cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Basic_spec.js
  3. cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_FormWidget_spec.js
  4. cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_MultiSelectWidget_spec.js
  5. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonGroup_MenuButton_Width_spec.js
  6. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Chart_spec.js
  7. cypress/integration/Regression_TestSuite/ServerSideTests/MySQL_Datatypes/False_Spec.ts
Identified Flaky tests

@github-actions
Copy link

github-actions bot commented Apr 6, 2023

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/4625640911.
Commit: efe7c48.
The following are new failures, please fix them before merging the PR:

  1. cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/GitSyncedApps_spec.js

  2. cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Basic_spec.js
  3. cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_FormWidget_spec.js
  4. cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_MultiSelectWidget_spec.js
  5. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonGroup_MenuButton_Width_spec.js
  6. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Chart_spec.js
Identified Flaky tests

Base automatically changed from feat/airgap-image-bundle to release April 10, 2023 07:02
@berzerkeer berzerkeer marked this pull request as ready for review April 10, 2023 07:36
@berzerkeer
Copy link
Contributor Author

/ok-to-test sha=a03ca99

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/4655562109.
Workflow: Appsmith External Integration Test Workflow.
Commit: a03ca99.
PR: 22129.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=22129&runId=4655562109_1

@github-actions github-actions bot added the Airgap Tickets related to supporting air-gapped Appsmith instances label Apr 10, 2023
@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/4675542765.
Workflow: Appsmith External Integration Test Workflow.
Commit: 336606c.
PR: 22129.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=22129&runId=4675542765_1

@berzerkeer
Copy link
Contributor Author

/ok-to-test sha=15e51fe

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/4675678523.
Workflow: Appsmith External Integration Test Workflow.
Commit: 15e51fe.
PR: 22129.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=22129&runId=4675678523_1

jsartisan
jsartisan previously approved these changes Apr 12, 2023
Copy link
Contributor

@jsartisan jsartisan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -0,0 +1,9 @@
@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap");
Copy link
Contributor

@ichik ichik Apr 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential performance optimization for the future. Loading CSS with <link> is more performant than doing @import (ref).
Additionally, since the font is defined in the application theme we don't need to load everything in the deployed app.

ichik
ichik previously approved these changes Apr 12, 2023
@github-actions
Copy link

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/4675678523.
Commit: 15e51fe.
The following are new failures, please fix them before merging the PR:

  1. cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_FormWidget_spec.js

  2. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonGroup_MenuButton_Width_spec.js
  3. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Chart_spec.js
  4. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_dataIdentifierProperty_spec.js
  5. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Sliders/CategroySlider_spec.ts
To know the list of identified flaky tests - Refer here

@github-actions
Copy link

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/4675678523.
Commit: 15e51fe.
The following are new failures, please fix them before merging the PR:

  1. cypress/integration/Regression_TestSuite/ClientSideTests/ThemingTests/Theme_FormWidget_spec.js

  2. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonGroup_MenuButton_Width_spec.js
  3. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Chart/Chart_spec.js
  4. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/ListV2/Listv2_dataIdentifierProperty_spec.js
To know the list of identified flaky tests - Refer here

@berzerkeer berzerkeer dismissed stale reviews from ichik and jsartisan via b216eea April 12, 2023 12:26
@berzerkeer
Copy link
Contributor Author

/ok-to-test sha=b216eea

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/4678266206.
Workflow: Appsmith External Integration Test Workflow.
Commit: b216eea.
PR: 22129.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=22129&runId=4678266206_1

@berzerkeer
Copy link
Contributor Author

/ok-to-test sha=6c346f2

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/4679132691.
Workflow: Appsmith External Integration Test Workflow.
Commit: 6c346f2.
PR: 22129.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=22129&runId=4679132691_1

@github-actions
Copy link

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/4679132691.
Commit: 6c346f2.
The following are new failures, please fix them before merging the PR:

  1. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonGroup_MenuButton_Width_spec.js

  2. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/Inline_editing_spec.js
  3. cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/DeleteWorkspace_spec.js
  4. cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/MemberRoles_Spec.ts
  5. cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/Postgres2_Spec.ts
  6. cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/JSOnLoad1_Spec.ts
To know the list of identified flaky tests - Refer here

@github-actions
Copy link

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/4679132691.
Commit: 6c346f2.
The following are new failures, please fix them before merging the PR:

  1. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonGroup_MenuButton_Width_spec.js

To know the list of identified flaky tests - Refer here

@berzerkeer
Copy link
Contributor Author

/ci-merge-check

@github-actions
Copy link

found ci-merge-check 22129

@github-actions
Copy link

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/4679132691.
Commit: 6c346f2.
The following are new failures, please fix them before merging the PR:

  1. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Button/ButtonGroup_MenuButton_Width_spec.js

To know the list of identified flaky tests - Refer here

@trishaanand trishaanand merged commit c574433 into release Apr 13, 2023
@trishaanand trishaanand deleted the feat/bundle-fonts branch April 13, 2023 13:18
dvj1988 pushed a commit that referenced this pull request Aug 7, 2024
## Description
Google fonts are served by the appsmith instance and change that was
introduced in t[his
PR](#22129). This PR removes
redundant the import of google fonts from googleapis.

Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.All"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10270353461>
> Commit: 142bcc8
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10270353461&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Tue, 06 Aug 2024 17:21:17 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **New Features**
- Transitioned to a fully local/custom font strategy, enhancing branding
consistency and potentially improving load times.

- **Usability Improvements**
- Enhanced output readability in the GitHub Actions workflow, making it
easier for users to identify changed files.
- Updated the file change detection mechanism in the GitHub Actions
workflow for better performance and clarity.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Airgap Tickets related to supporting air-gapped Appsmith instances Enhancement New feature or request Frontend This label marks the issue or pull request to reference client code Platform Administration Pod Issues related to platform administration & management Task A simple Todo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add font fallback to reduce FOUT [Task]: Bundle fonts with the client build for air-gapped instances.

4 participants