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

Remerge changes to main #85

Merged
merged 3 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions THIRD-PARTY-NOTICES
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The following NPM packages may be included in this product:

- @yext/[email protected]
- @yext/[email protected].0
- @yext/[email protected].0
- @yext/[email protected].1
- @yext/[email protected].1

These packages each contain the following license and notice below:

Expand Down
22 changes: 11 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@yext/chat-ui-react",
"version": "0.11.0",
"version": "0.11.3",
"description": "A library of React Components for powering Yext Chat integrations.",
"author": "[email protected]",
"main": "./lib/commonjs/src/index.js",
Expand Down Expand Up @@ -69,7 +69,7 @@
"@testing-library/user-event": "^14.4.3",
"@types/jest": "^29.5.1",
"@types/react": "^18.2.7",
"@yext/chat-headless-react": "^0.9.0",
"@yext/chat-headless-react": "^0.9.1",
"@yext/eslint-config": "^1.0.0",
"babel-jest": "^29.5.0",
"eslint": "^8.39.0",
Expand All @@ -91,7 +91,7 @@
"typescript": "^5.0.4"
},
"peerDependencies": {
"@yext/chat-headless-react": "^0.9.0",
"@yext/chat-headless-react": "^0.9.1",
"react": "^16.14 || ^17 || ^18",
"react-dom": "^16.14 || ^17 || || ^18"
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/ChatInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export interface ChatInputProps {
export function ChatInput({
placeholder = "Type a message...",
stream = false,
inputAutoFocus = false,
inputAutoFocus = true,
handleError,
sendButtonIcon = <ArrowIcon />,
customCssClasses,
Expand Down
2 changes: 1 addition & 1 deletion src/components/FeedbackButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export interface FeedbackButtonsCssClasses {
const builtInCssClasses: FeedbackButtonsCssClasses =
withStylelessCssClasses<FeedbackButtonsCssClasses>("FeedbackButtons", {
container:
"flex gap-x-1 absolute -right-1 -top-3 opacity-0 group-hover:opacity-100 duration-200",
"flex gap-x-1 absolute -right-1 -top-3 [@media(hover:hover)]:opacity-0 group-hover:opacity-100 duration-200",
thumbsUpButton:
"w-6 h-6 bg-gray-700 rounded-md flex justify-center items-center",
thumbsUpIcon: "text-white w-[22px] h-[22px] stroke-[0.2]",
Expand Down
3 changes: 3 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ module.exports = {
require("@tailwindcss/typography"),
require("@tailwindcss/container-queries"),
],
future: {
hoverOnlyWhenSupported: true,
},
};
6 changes: 3 additions & 3 deletions test-site/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions tests/components/ChatInput.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ it("updates text when type in textarea", async () => {
expect(textbox).toHaveDisplayValue("test");
});

it("does not focus on input box by default", async () => {
it("maintains focus on input box by default", async () => {
render(<ChatInput />);
const textbox = screen.getByRole("textbox");
expect(textbox).not.toHaveFocus();
expect(textbox).toHaveFocus();
});

it("maintains focus on input box when inputAutoFocus field is set to true", async () => {
render(<ChatInput inputAutoFocus={true} />);
it("does not focus on input box when inputAutoFocus field is set to false", async () => {
render(<ChatInput inputAutoFocus={false} />);
const textbox = screen.getByRole("textbox");
expect(textbox).toHaveFocus();
expect(textbox).not.toHaveFocus();
});

it("sends request and reset input when click on send button", async () => {
Expand Down
Loading