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

add keyboard command #369

Merged
merged 18 commits into from
Jul 2, 2024
Merged

Conversation

k70suK3-k06a7ash1
Copy link
Contributor

@k70suK3-k06a7ash1 k70suK3-k06a7ash1 commented Jun 14, 2024

Issue #, if available:
#370
#368
Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@k70suK3-k06a7ash1 k70suK3-k06a7ash1 marked this pull request as ready for review June 14, 2024 01:47
@k70suK3-k06a7ash1
Copy link
Contributor Author

チャット欄フォーカス
QuestionIconでショートカット一覧を表示

@k70suK3-k06a7ash1
Copy link
Contributor Author

refをChatInput内で定義しているため、liftupするか、ref合成の必要ありそう?

@k70suK3-k06a7ash1
Copy link
Contributor Author

綺麗ではないけどText Areaに個別にEffect追加

@k70suK3-k06a7ash1
Copy link
Contributor Author

スクリーンショット 2024-06-17 15 01 46 こんな感じでModal作成しました

@k70suK3-k06a7ash1
Copy link
Contributor Author

@wadabee @statefb
こちらお手隙でご確認いただけますと幸いですmm

@k70suK3-k06a7ash1
Copy link
Contributor Author

Lint修正

Copy link
Contributor

@wadabee wadabee left a comment

Choose a reason for hiding this comment

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

PRありがとうございます!
コメントをご確認くださいmm

frontend/src/pages/ChatPage.tsx Show resolved Hide resolved
frontend/src/pages/ChatPage.tsx Show resolved Hide resolved
frontend/src/components/Textarea.tsx Outdated Show resolved Hide resolved
frontend/src/pages/ChatPage.tsx Outdated Show resolved Hide resolved
frontend/src/features/heler/components/BottomHelper.tsx Outdated Show resolved Hide resolved
frontend/src/features/heler/components/BottomHelper.tsx Outdated Show resolved Hide resolved
@k70suK3-k06a7ash1
Copy link
Contributor Author

@wadabee
レビューありがとうございます!!
修正します!

@k70suK3-k06a7ash1
Copy link
Contributor Author

sample code

var ua = window.navigator.userAgent.toLowerCase();

if(ua.indexOf("windows nt") !== -1) {
  console.log("「Microsoft Windows」をお使いですね!");
} else if(ua.indexOf("android") !== -1) {
  console.log("「Android」をお使いですね!");
} else if(ua.indexOf("iphone") !== -1 || ua.indexOf("ipad") !== -1) {
  console.log("「iOS」をお使いですね!");
} else if(ua.indexOf("mac os x") !== -1) {
  console.log("「macOS」をお使いですね!");
} else {
  console.log("何をお使いなのですか?");
}

@k70suK3-k06a7ash1
Copy link
Contributor Author

Premise : macOS

userAgent userAgentData
Safari macOS disabled api
Chrome getOS => Android NotWindows as macOS

@k70suK3-k06a7ash1
Copy link
Contributor Author

k70suK3-k06a7ash1 commented Jun 24, 2024

      window.navigator?.userAgentData
        ?.getHighEntropyValues(['platformVersion'])
        ?.then((ua) => {
          if (navigator.userAgentData.platform === 'Windows') {
            const majorPlatformVersion = parseInt(
              ua.platformVersion.split('.')[0]
            );
            if (majorPlatformVersion >= 13) {
              console.log('Windows 11 or later');
            } else if (majorPlatformVersion > 0) {
              console.log('Windows 10');
            } else {
              console.log('Before Windows 10');
            }
          } else {
            console.log('Not running on Windows');
          }
        });

See : https://learn.microsoft.com/ja-jp/microsoft-edge/web-platform/how-to-detect-win11

@k70suK3-k06a7ash1
Copy link
Contributor Author

k70suK3-k06a7ash1 commented Jun 24, 2024

import Bowser from 'bowser';
...

const browser = Bowser.getParser(window.navigator.userAgent);
const os = browser.getOSName();

build-in

@k70suK3-k06a7ash1 k70suK3-k06a7ash1 changed the title add keyboard command and fix bug add keyboard command Jun 24, 2024
@k70suK3-k06a7ash1
Copy link
Contributor Author

@statefb @wadabee
こちら修正とWindows端末での検証まで完了しました!

@statefb
Copy link
Contributor

statefb commented Jun 25, 2024

ありがとうございます!
@wadabee LGTMでしたらマージお願いします!

Copy link
Contributor

@wadabee wadabee left a comment

Choose a reason for hiding this comment

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

ご対応ありがとうございます!
コメントのご確認お願いしますmm

frontend/src/features/heler/components/BottomHelper.tsx Outdated Show resolved Hide resolved
frontend/src/i18n/en/index.ts Outdated Show resolved Hide resolved
frontend/src/features/heler/components/BottomHelper.tsx Outdated Show resolved Hide resolved
@@ -0,0 +1,58 @@
import { useState } from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

すみません、見逃していました!
フォルダ名がtypoしています!(heler -> helper)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

指摘ありがとうございます!
失礼しましたmm

Copy link
Contributor

@wadabee wadabee left a comment

Choose a reason for hiding this comment

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

LGTM !!
Thanks for your contribution!

@wadabee wadabee merged commit 2ea29f3 into aws-samples:v1 Jul 2, 2024
6 checks passed
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