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

Local fonts and background local image #295

Merged
merged 5 commits into from
Jul 7, 2023

Conversation

gintama91
Copy link
Collaborator

Description

  • background local image
  • local fonts
  • seperating base64 from image

Image(if needed, helps for a faster review)

Screenshot_20230707_170101

Checklist

  • Run tests locally
  • Run linter(check for linter errors)

@gintama91 gintama91 changed the title Local image Local fonts and background local image Jul 7, 2023
@@ -1,13 +1,18 @@
# frozen_string_literal: true

require_relative "../base64"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd prefer require "scarpe/base64" here since at some point we want to separate the core Shoes API into a different gem than Webview.

@@ -0,0 +1,34 @@
# frozen_string_literal: true

require_relative "../base64"
Copy link
Collaborator

Choose a reason for hiding this comment

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

And same here.

require "uri"
# require "base64"
# require "uri"
require_relative "../base64"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove rather than commenting out the lines above (plus same require request as above.)

@noahgibbs
Copy link
Collaborator

Other than the small changes mentioned above, this is great! And since "font" was the first obstacle to running Hackety-Hack, we should update #166 after this gets merged!

remove puts

update from review
@gintama91
Copy link
Collaborator Author

removed them

@noahgibbs
Copy link
Collaborator

Two examples failing (https://github.com/scarpe-team/scarpe/actions/runs/5487079739/jobs/9998032426?pr=295). One is a timeout and probably not your fault - I'll download the logs and have a look. The other is about background_color and is likely to repeat.

I'm hitting "restart" on the test run.

@gintama91
Copy link
Collaborator Author

ah not sure why it passing now.. hmm

@gintama91
Copy link
Collaborator Author

hmm why do we even get array here..

@noahgibbs
Copy link
Collaborator

Also this has some conflicts that want a manual resolve to get to head-of-main.

@gintama91
Copy link
Collaborator Author

ah ok so it basically has to do with when we call background red here we are getting array as return

@gintama91
Copy link
Collaborator Author

related to #249

@gintama91
Copy link
Collaborator Author

Also this has some conflicts that want a manual resolve to get to head-of-main.

oh hm ha i will update tht along with handlign array case

@gintama91
Copy link
Collaborator Author

hm ok changed
andmodified border too
Screenshot_20230707_200128

h.style do
<<~CSS
@font-face {
font-family: Pacifico;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Huh. Can we change this so it's not always Pacifico?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah oh we can its just a custom name but like get name from filepath?

Copy link
Collaborator

Choose a reason for hiding this comment

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

That sounds like a good way to do it, yeah.

I mean, if we can't customise then we can't, but it seems worth a try.

@gintama91
Copy link
Collaborator Author

okay will do , for some reason my git kraken not opening lol

@gintama91
Copy link
Collaborator Author

changed

directory_path = File.dirname(__FILE__, 3)

image_path = File.join(directory_path, image_filename)
puts "directory_path: #{directory_path}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should probably remove this puts.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah hm ha sorry abt tht

remove puts
@gintama91
Copy link
Collaborator Author

removed

@noahgibbs
Copy link
Collaborator

Looks good. Once the test finishes I'll merge.

@noahgibbs noahgibbs merged commit 721ba02 into scarpe-team:main Jul 7, 2023
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.

2 participants