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

Open
wants to merge 13 commits into
base: v1
Choose a base branch
from

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
<>
<div className="flex justify-between px-4 pb-2">
<div />
<PiQuestionFill
Copy link
Contributor

Choose a reason for hiding this comment

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

アプリのデザイン思想として、「必ずクリックする必要のあるもの」「注意してクリックする必要があるもの」などを除き、outlinedなボタンにしています。
ヘルプはそれらに該当しないので、fillではないアイコンをご利用くださいmm

送信ボタンがoutlinedなので、直したい気持ちになってきました。。
余裕があったら、 修正をお願いしますmm
(ボーダー無し、bg-aws-sea-blue hover:bg-aws-sea-blue-hover text-white

Copy link
Contributor Author

Choose a reason for hiding this comment

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

送信ボタンがoutlinedなので、直したい気持ちになってきました。。
余裕があったら、 修正をお願いしますmm

こちら承知です!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

スクリーンショット 2024-06-24 11 21 15 スクリーンショット 2024-06-24 11 21 26 上記のような感じで修正しました! イメージ違ったらご指摘いただけると幸いですmm

Copy link
Contributor

Choose a reason for hiding this comment

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

ありがとうございます!助かります!
アイコンの存在感を出したいので、Fiilなアイコンでお願いしますmm

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

Choose a reason for hiding this comment

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

すみません、わかりづらかったですmm
以下のような感じでお願いします!
image

@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

Comment on lines +9 to +11
const browser = Bowser.getParser(window.navigator.userAgent);
const os = browser.getOSName();
const isWindows = os === 'Windows';
Copy link
Contributor

Choose a reason for hiding this comment

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

ここ以外でも利用しているので、Hooks等を使って共通化していただけないでしょうか?

@@ -511,6 +511,15 @@ How would you categorize this email?`,
message: 'Please input both Title and Conversation Example.',
},
},
heler: {
shortcuts: {
title: 'shortcut keys',
Copy link
Contributor

Choose a reason for hiding this comment

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

見出しは単語を大文字始まりにしているので、修正をお願いします!
Shortcut Keys のようなイメージです。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

承知しました!

<>
<div className="flex justify-between px-4 pb-2">
<div />
<PiQuestionFill
Copy link
Contributor

Choose a reason for hiding this comment

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

すみません、わかりづらかったですmm
以下のような感じでお願いします!
image

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.

None yet

3 participants