Skip to content

Commit

Permalink
Change subtle color (#4686)
Browse files Browse the repository at this point in the history
  • Loading branch information
compulim authored Mar 28, 2023
1 parent 2c853c8 commit 7c84458
Show file tree
Hide file tree
Showing 24 changed files with 66 additions and 23 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

- Fixes [#4557](https://github.com/microsoft/BotFramework-WebChat/issues/4557). Flipper buttons in carousels and suggested actions is now renamed to "next/previous" from "left/right", by [@compulim](https://github.com/compulim), in PR [#4646](https://github.com/microsoft/BotFramework-WebChat/pull/4646)
- Fixes [#4652](https://github.com/microsoft/BotFramework-WebChat/issues/4652). Keyboard help screen, activity focus traps, and chat history terminator should not be hidden behind `aria-hidden` because they are focusable, by [@compulim](https://github.com/compulim), in PR [#4659](https://github.com/microsoft/BotFramework-WebChat/pull/4659)
- Related to [#4650](https://github.com/microsoft/BotFramework-WebChat/issues/4650). Added automated accessibility check using [`axe-core`](https://npmjs.com/package/axe-core)
- HTML test: changed contrast ratio in tests that use different background colors, by [@compulim](https://github.com/compulim), in PR [#XXX](https://github.com/microsoft/BotFramework-WebChat/pull/XXX)

### Changed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
run(async function () {
const store = testHelpers.createStore();
const directLine = WebChat.createDirectLine({ token: await testHelpers.token.fetchDirectLineToken() });
const baseProps = { directLine, store };
const baseProps = { directLine, store, styleOptions: { subtle: '#666' } };
const webChatElement = document.getElementById('webchat');

WebChat.renderWebChat(baseProps, webChatElement);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
run(async function () {
const store = testHelpers.createStore();
const directLine = WebChat.createDirectLine({ token: await testHelpers.token.fetchDirectLineToken() });
const baseProps = { directLine, store };
const baseProps = { directLine, store, styleOptions: { subtle: '#666' } };
const webChatElement = document.getElementById('webchat');

WebChat.renderWebChat(baseProps, webChatElement);
Expand Down
3 changes: 2 additions & 1 deletion __tests__/html/adaptiveCards.tapAction.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
WebChat.renderWebChat(
{
directLine,
store: testHelpers.createStore()
store: testHelpers.createStore(),
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down
5 changes: 4 additions & 1 deletion __tests__/html/autoScroll.acknowledgement.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@
{
directLine,
store,
styleOptions: { autoScrollSnapOnPage: true }
styleOptions: {
autoScrollSnapOnPage: true,
subtle: '#666'
}
},
webChatElement
);
Expand Down
3 changes: 2 additions & 1 deletion __tests__/html/autoScroll.snap.activity.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
store,
styleOptions: {
autoScrollSnapOnActivity: 2,
autoScrollSnapOnActivityOffset: 100
autoScrollSnapOnActivityOffset: 100,
subtle: '#666'
}
},
webChatElement
Expand Down
3 changes: 2 additions & 1 deletion __tests__/html/autoScroll.snap.activityAndPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
styleOptions: {
autoScrollSnapOnActivity: true,
autoScrollSnapOnPage: true,
autoScrollSnapOnPageOffset: -100
autoScrollSnapOnPageOffset: -100,
subtle: '#666'
}
},
webChatElement
Expand Down
9 changes: 8 additions & 1 deletion __tests__/html/autoScroll.snap.default.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,14 @@
run(async function () {
const webChatElement = document.getElementById('webchat');

WebChat.renderWebChat({ directLine, store }, webChatElement);
WebChat.renderWebChat(
{
directLine,
store,
styleOptions: { subtle: '#666' }
},
webChatElement
);

await pageConditions.uiConnected();

Expand Down
5 changes: 4 additions & 1 deletion __tests__/html/autoScroll.snap.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@
{
directLine,
store,
styleOptions: { autoScrollSnapOnPage: 0.2 }
styleOptions: {
autoScrollSnapOnPage: 0.2,
subtle: '#666'
}
},
webChatElement
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
run(async function () {
const store = testHelpers.createStore();
const directLine = WebChat.createDirectLine({ token: await testHelpers.token.fetchDirectLineToken() });
const baseProps = { directLine, store };
const baseProps = { directLine, store, styleOptions: { subtle: '#666' } };
const webChatElement = document.getElementById('webchat');

WebChat.renderWebChat(baseProps, webChatElement);
Expand Down
3 changes: 2 additions & 1 deletion __tests__/html/focusManagement.disableHeroCard.obsolete.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
return next(...args);
},
directLine,
store
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/focusManagement.disableUI.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
run(async function () {
const store = testHelpers.createStore();
const directLine = WebChat.createDirectLine({ token: await testHelpers.token.fetchDirectLineToken() });
const baseProps = { directLine, store };
const baseProps = { directLine, store, styleOptions: { subtle: '#666' } };
const webChatElement = document.getElementById('webchat');

WebChat.renderWebChat(baseProps, webChatElement);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
WebChat.renderWebChat(
{
directLine,
store
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
WebChat.renderWebChat(
{
directLine,
store
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down
3 changes: 2 additions & 1 deletion __tests__/html/focusManagement.sendBoxTextBoxSubmit.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
WebChat.renderWebChat(
{
directLine,
store
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down
3 changes: 2 additions & 1 deletion __tests__/html/focusManagement.sendFailedRetry.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
window.WebChat.renderWebChat(
{
directLine: hackedDirectLine,
store
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down
3 changes: 2 additions & 1 deletion __tests__/html/focusManagement.suggestedActions.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
WebChat.renderWebChat(
{
directLine,
store
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,14 @@
]);
const store = testHelpers.createStore();

WebChat.renderWebChat({ directLine, store }, document.getElementById('webchat'));
WebChat.renderWebChat(
{
directLine,
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);

await pageConditions.uiConnected();
await pageConditions.numActivitiesShown(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,14 @@
]);
const store = testHelpers.createStore();

WebChat.renderWebChat({ directLine, store }, document.getElementById('webchat'));
WebChat.renderWebChat(
{
directLine,
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);

await pageConditions.uiConnected();
await pageConditions.numActivitiesShown(3);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
WebChat.renderWebChat(
{
directLine,
store
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
WebChat.renderWebChat(
{
directLine,
store
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down
3 changes: 2 additions & 1 deletion __tests__/html/useTextBoxSubmit.main.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
const renderWebChatWithHook = testHelpers.createRenderWebChatWithHook(
{
directLine: WebChat.createDirectLine({ token: await testHelpers.token.fetchDirectLineToken() }),
store: testHelpers.createStore()
store: testHelpers.createStore(),
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down
3 changes: 2 additions & 1 deletion __tests__/html/useTextBoxSubmit.sendBox.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
{
activityMiddleware: testHelpers.createRunHookActivityMiddleware(),
directLine,
store
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down
3 changes: 2 additions & 1 deletion __tests__/html/useTextBoxSubmit.sendBoxWithoutKeyboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
{
activityMiddleware: testHelpers.createRunHookActivityMiddleware(),
directLine,
store
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down

0 comments on commit 7c84458

Please sign in to comment.