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

Text input #935

Merged
merged 13 commits into from
Jan 6, 2023
Merged

Text input #935

merged 13 commits into from
Jan 6, 2023

Conversation

matteodepalo
Copy link
Contributor

@matteodepalo matteodepalo commented Dec 15, 2022

WHY are these changes introduced?

We want to update our text prompt so that they conform to our new designs.

WHAT is this pull request doing?

This PR adds a TextPrompt and TextInput components that can be used by calling the renderTextPrompt method.
Here's how it looks:

How to test your changes?

Run shopify kitchen-sink and check out the component!

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've made sure that any changes to dev or deploy have been reflected in the internal flowchart.

@github-actions
Copy link
Contributor

Thanks for your contribution!

Depending on what you are working on, you may want to request a review from a Shopify team:

  • Themes: @shopify/theme-developer-tools
  • UI extensions: @shopify/ui-extensions-cli
    • Checkout UI extensions: @shopify/checkout-ui-extensions-api-stewardship
  • Hydrogen: @shopify/hydrogen
  • Other: @shopify/cli-foundations

@matteodepalo matteodepalo changed the base branch from main to progress-bar December 16, 2022 15:15
@matteodepalo matteodepalo force-pushed the progress-bar branch 2 times, most recently from 3ec97ef to b04defa Compare January 4, 2023 10:48
Base automatically changed from progress-bar to main January 4, 2023 11:21
@matteodepalo matteodepalo force-pushed the text-input branch 2 times, most recently from c986298 to 752c7b3 Compare January 4, 2023 13:37
Refactor text input

Fix SelectPrompt

Move onEnter test

Do not allow text submission without answer

Check cursorOffset instead of nextCursorOffset
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2023

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
68.65% (+0.26% 🔼)
3620/5273
🟡 Branches
65.02% (+0.99% 🔼)
1515/2330
🟡 Functions
66.76% (+0.05% 🔼)
920/1378
🟡 Lines
69.49% (+0.32% 🔼)
3451/4966
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / SelectPrompt.tsx
100% 100% 100% 100%
🟢
... / TextInput.tsx
100% 95.65% 100% 100%
🟢
... / TextPrompt.tsx
100% 100% 100% 100%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟡
... / app.ts
61.22% (-0.78% 🔻)
28.57% 50%
64.44% (-0.77% 🔻)
🟢
... / specifications.ts
80.65% (-0.6% 🔻)
75% 83.33% 82.14%
🔴
... / theme.ts
36.36% (-2.77% 🔻)
0% 18.18%
38.1% (-2.81% 🔻)
🔴
... / order_discounts.ts
50% (-50% 🔻)
100%
0% (-100% 🔻)
50% (-50% 🔻)
🟢
... / extension.ts
83.33% (-13.33% 🔻)
69.23% (-15.38% 🔻)
80% (-20% 🔻)
88.46% (-7.69% 🔻)
🟡
... / bundler.ts
72.22% (-1.46% 🔻)
87.5% 50%
72.22% (-1.46% 🔻)
🟡
... / extension.ts
60.81% (-20.27% 🔻)
51.61% (-15.05% 🔻)
58.82% (-17.65% 🔻)
60.81% (-20.27% 🔻)
🔴
... / http-reverse-proxy.ts
43.33% (-1.83% 🔻)
38.46% 28.57%
48.15% (-1.85% 🔻)
🟢
... / session.ts
81.1% (-0.44% 🔻)
79.49% (+0.74% 🔼)
92.31%
80.8% (-0.45% 🔻)
🟢
... / fqdn.ts
100%
91.67% (-2.78% 🔻)
100% 100%
🟢
... / service.ts
100%
75% (-12.5% 🔻)
100% 100%
🔴
... / ui.tsx
41.67% (-13.89% 🔻)
75%
41.67% (-20.83% 🔻)
50% (-5.56% 🔻)

Test suite run success

901 tests passing in 465 suites.

Report generated by 🧪jest coverage report action from 83a4f70

@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2023

Benchmark report

Couldn't find benchmark file. Did you run the benchmark?

@matteodepalo matteodepalo marked this pull request as ready for review January 6, 2023 11:04
@github-actions

This comment has been minimized.

@matteodepalo matteodepalo requested review from a team, Arkham and pepicrft and removed request for a team January 6, 2023 11:05
Copy link
Contributor

@pepicrft pepicrft left a comment

Choose a reason for hiding this comment

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

🎩 Tophatted and works as expected (including Windows). Excellent job here 👏🏼

@matteodepalo matteodepalo merged commit 9be73a3 into main Jan 6, 2023
@matteodepalo matteodepalo deleted the text-input branch January 6, 2023 15:43
@shopify-shipit shopify-shipit bot temporarily deployed to package January 9, 2023 17:53 Inactive
@MeredithCastile
Copy link
Contributor

@matteodepalo, let me know if you'd like me to open a new issue for this.

Could we please update the error message to: Type an answer to the prompt.

@shopify-shipit shopify-shipit bot temporarily deployed to nightly January 10, 2023 19:42 Inactive
@shopify-shipit shopify-shipit bot temporarily deployed to production January 11, 2023 16:30 Inactive
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.

3 participants