aws / mynah-ui

The chat interface of Amazon Q Developer (for IDEs)
https://aws.github.io/mynah-ui/
Apache License 2.0
15 stars 14 forks source link

fix: enable scroll in text input when no text #114

Closed 32teeth closed 4 weeks ago

32teeth commented 1 month ago

Problem

The text input field in the chat prompt component doesn't allow scrolling when no text is present, causing usability issues. The placeholder text width doesn't adjust dynamically, leading to improper alignment and a poor user experience.

Solution

scrollable-placeholder

Bonus

[!TIP] import open from'open'; spacing issue and module / mjs was complaining

  • Updated dev.js to handle file opening errors using a dynamic import.

[!TIP] Although we have watchers, added serve:example for refreshing developer environment without refreshing browser (wasn't working previously as intended as CMD+F5 had to be invoked

  • Added new scripts in package.json to improve development workflow, including watch:web and serve:example commands.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

dogusata commented 1 month ago

Another very important point for these kind of changes that they need UX team approval first before implementing these kind of changes. Previously these kind of changes were caused several unexpected UI behaviors and visual regressions. Unless they're precisely investigated and clearly requested from the UX team, we're not changing behavior or the style of the components. For example, they may prefer to have a tooltip or shorten the placeholder since it already has an ellipsis. Also, there is already an ongoing progress for the discoverability of the features through the welcome message instead of relying on the placeholder of the prompt text.

I would strongly suggest contact with the UX team first, and after that wait until the e2e integration test PR is merged. This change should also require a new/updated e2e tests with golden screenshot comparison. Only with that we can assure that we're not causing any visual regressions or unexpected behaviors.

32teeth commented 1 month ago

Another very important point for these kind of changes that they need UX team approval first before implementing these kind of changes.

Is there a best contact for the UX team?

32teeth commented 1 month ago

Thanks @dogusata for the intro to the UX/UI creative leads

This is the current behaviour of the GitHub Copilot experience (scrollable input box when empty, place holder only)

The implementation is pretty much a replication of those mechanics (super light weight)

I’d be okay to fast follow with a tooltip, before hand we’d need to assess all the use cases for the tool tip but that’s a tomorrow day kinda discussion

Anyway, thanks for the reflection and remarks, I can do a follow up PR.

I’ll sign up for the Ui discussion next week to identify strategy and next steps

32teeth commented 4 weeks ago

CLosing to rebase and correct merge conflicts