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

fix: added support for custom fonts in ensemble studio #803

Merged
merged 11 commits into from
Sep 30, 2024

Conversation

sagardspeed2
Copy link
Contributor

@sagardspeed2 sagardspeed2 commented Aug 28, 2024

Describe your changes

Added support for custom fonts in ensemble studio

Screenshots [Optional]

  1. uploaded font
    image

  2. added classname (topHeader) in screen
    image

  3. added style (fontFamily in topHeader class) to class in theme
    image

  4. output
    image

Issue ticket number and link

Closes #762

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have added tests
  • I have added a changeset pnpm changeset add
  • I have added example usage in the kitchen sink app

Copy link

changeset-bot bot commented Aug 28, 2024

🦋 Changeset detected

Latest commit: aa866a4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@ensembleui/react-framework Patch
@ensembleui/react-kitchen-sink Patch
@ensembleui/react-preview Patch
@ensembleui/react-starter Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Aug 28, 2024

Visit the preview URL for this PR (updated for commit aa866a4):

https://react-kitchen-sink-dev--pr803-762-support-custom-f-cfsxmazw.web.app

(expires Mon, 07 Oct 2024 05:08:02 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 6267897ade2ba783b6db70a53a60fc3946d625e9

packages/framework/src/loader.ts Outdated Show resolved Hide resolved
packages/framework/src/hooks/useFonts.ts Outdated Show resolved Hide resolved
@sagardspeed2
Copy link
Contributor Author

@evshi this PR is still not ready for review, I am still working on it

@amin-nas
Copy link

@sagardspeed2 @evshi please see latest EDL example here:
EnsembleUI/ensemble#1576

packages/framework/tsconfig.json Outdated Show resolved Hide resolved
packages/framework/src/shared/dto.ts Outdated Show resolved Hide resolved
packages/framework/src/hooks/useFonts.ts Outdated Show resolved Hide resolved
packages/framework/src/hooks/useApplicationContext.tsx Outdated Show resolved Hide resolved
packages/framework/src/hooks/useFonts.ts Outdated Show resolved Hide resolved
@evshi
Copy link
Contributor

evshi commented Sep 27, 2024

@sagardspeed2 is this ready to be merged?

@sagardspeed2
Copy link
Contributor Author

@sagardspeed2 is this ready to be merged?

@evshi we need to run this in production first to clear the cors issue
gsutil cors set cors.json <bucket_name>

and I don't have the production firebase access

@evshi
Copy link
Contributor

evshi commented Sep 27, 2024

@sagardspeed2 why do we need to run that command? @justEhmadSaeed is this something you can help with?

@sagardspeed2
Copy link
Contributor Author

@evshi we are trying to fetch the font files from the firebase and there is cors added for the origin. so when I tested it was giving cors error while fetching the font files from the firebase. so I used this command for dev firebase storage, and it works.

@justEhmadSaeed
Copy link
Member

@sagardspeed2 i don't understand why you need to set cors for fonts when it's already being fetched by the prod app. if you want to fetch the prod data on the local, then it's disabled intentionally.

@sagardspeed2 sagardspeed2 merged commit ef1744c into main Sep 30, 2024
3 checks passed
@sagardspeed2 sagardspeed2 deleted the 762-support-custom-fonts branch September 30, 2024 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support custom fonts
4 participants