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

Added font and tooltip to edit-box #537

Merged
merged 3 commits into from
Feb 2, 2024
Merged

Added font and tooltip to edit-box #537

merged 3 commits into from
Feb 2, 2024

Conversation

Nj221102
Copy link
Contributor

@Nj221102 Nj221102 commented Feb 2, 2024

Description

This PR adds:-

  1. font-shorthand property to edit-box which allows users to decide how their text should look inside the edit box, and they can write any property in any order if they maintain the white space between the properties.

  2. Tooltip which can be used to give suggestions to people while they input something in the edit box, u can write anything u want to be shown when someone is hovering over the input field (text area), it goes away as soon as someone starts writing ,not causing any distraction

Shoes.app do
    para "Anything:",size:"30px"
    lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim."
    @manuscript = edit_box(lorem, width: "100%", font:"italic normal bold 25px 'Times New Roman', serif;", tooltip:"This is a tooltip") do |box|
      @char_count.replace("#{box.text.length} characters")
    end
    @char_count = para "#{@manuscript.text.length} characters" ,size:"20px"
  end

Image(if needed, helps for a faster review)

Screenshot 2024-02-02 at 4 25 19 PM

Checklist

  • Run tests locally

@noahgibbs
Copy link
Collaborator

Looks good! Yay fonts and yay tooltips!

I'm still seeing at least one test breaking in CI, though it looks pretty straightforward to fix.

@noahgibbs noahgibbs merged commit c7fec3a into scarpe-team:main Feb 2, 2024
1 check passed
@Nj221102
Copy link
Contributor Author

Nj221102 commented Feb 2, 2024

Looks good! Yay fonts and yay tooltips!

I'm still seeing at least one test breaking in CI, though it looks pretty straightforward to fix.

Looks good! Yay fonts and yay tooltips!

I'm still seeing at least one test breaking in CI, though it looks pretty straightforward to fix.

Fixed it , and sorry for taking two commits to fix a obvious thing , i was a little careless with whitespaces and i have a question as well,
why doesn't these error occurs when running tests locally using "bundle exec rake test"?

@Nj221102 Nj221102 deleted the edit-box branch February 2, 2024 11:34
@noahgibbs
Copy link
Collaborator

sorry for taking two commits to fix a obvious thing

I promise, we all do that kind of thing :-)

why doesn't these error occurs when running tests locally using "bundle exec rake test"?

The CI check (.github/workflows/ci.yml) actually does a number of things, not just "bundle exec rake test".

Scanning through, here are the tests its runs (not counting install, etc. that it also does):

CI_RUN='true' bundle exec rake lacci_test
CI_RUN='true' bundle exec rake component_test
CI_RUN-'true' bundle exec rake test
bundle exec rake test:check_html_fixtures

@noahgibbs
Copy link
Collaborator

It could definitely make sense to have a "bundle exec ci_test" or something that did all these.

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