-
Notifications
You must be signed in to change notification settings - Fork 9
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 ParamSetID to runs list in /jobs #720
Conversation
ありがとうございます。tooltipで表示する中身ですが、ParameterSetのIDではなく、Simulatorの名前とパラメータの値を表示するようにしていただけませんんか?
注意点として、ps.v の値(つまりHashの値)に別のHashが含まれる場合があります。その場合はonelineのJSON形式で表示していただけるとみやすいかと思います。 |
aaa65e1
to
52d44d1
Compare
tooltipの内容について、承知いたしました。 |
遅くなりまして申し訳ありません。こちら、対応済みのモノをpushいたしましたのでご確認下さい。 PR descriptionのスクリーンショットも更新済みになります。 |
定例にてコメントを頂きました。
ということで、tableなのかDL/DTなのかやれそうな方法を検討してみます。 |
本件、取り急ぎ現状報告です。やや難航してしまっており引き続き調査中です。 状況としては、Bootstrap Tooltipのドキュメントを見つつHTML挿入するだけだと、どうも一部のタグが消える挙動が起こっています。
タグによっては挿入できることを見ると、HTMLエンティティのエスケープ問題などではなく、JSレベルでフィルタなどがされていそうに思うのですが、Bootstrap TooltipのJSコードを見る限りでは普通にjQuery.html()を使って挿入しているだけのように見えます。 ただ、以下のJSFiddleなどではtableが挿入できているので、Bootstrap Tooltipのバージョンなども原因かもしれない、という所で引き続き調査中です。 |
40469eb
to
890c1f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
調査に時間かかってしまいましたが諸々対応版に更新しました。
str + "<dt>#{k}:</dt><dd> #{v}</dd>" | ||
end | ||
html = <<EOS | ||
<dl class='dl-horizontal'> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bootstrap純正のdescription listを使っています。
@yohm 調査時間かかってしまいましたが、無事表形式表示ができましたのでご確認下さい。 原因等についてはソースコメントに書いておきました 🙇♂️ |
承知しました。 今確認してみたところ、Bootstrapのdescription listのCSS問題(widthやmarginに固定値が指定されている)のようでした。 #他でdlタグを使っていなければ全体適用してしまってもよさそうですが |
定例メモ:tooltip内の.dl-horizontalの上書きで対応する |
before: parameter set ID after: simulator name & parameters
tooltipのtag whitelistを更新することで、tooltip内でdl / dt / ddタグが使えるように修正している。 refer: https://getbootstrap.com/docs/3.4/javascript/#js-sanitizer
In bootstrap 3, dl tag has fixed width and margin but table doesn't.
890c1f7
to
364989e
Compare
@yohm ※なお、伸張するようにしようとすると、今度はDD側がmargin-leftで位置調整されているため別の問題が発生してしまっていました。 というわけで、DLタグを使うのを諦め、TABLEタグで書き直したところ、見る限りいい感じになったように見えます。 TABLEのスタイルは |
In bootstrap 3, dl tag has fixed width and margin but table doesn't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ありがとうございます。確認しました。
refs: #714
既存の
app/datatables/parameter_sets_list_datatable.rb
の内容をベースにParamSetID(jobs.parameter_set_id)を表示するようにした。-> 2021/01/08: Tooltiopの表示内容をParameterSet IDからSimulator Nameとパラメータリストを表示するように修正
Screenshots
before
after
要確認事項
マウスhoverして表示されるtooltipのIDが、table側に表示されているIDと明らかに違うが、これは問題ないか?
#shortened_id の実装上こうなること、既存の
simulators#index
でも同様の仕様でParamSetIDが表示されていることから仕様としては既存のものに揃っているが、ぱっと見バグにも見えてしまうのでやや気になる。-> これはUUIDを使っている関係で先頭数文字はほぼ全部同じIDになってしまうことによる仕様。現状利用者側からも問題にはなっていないとのことなので、この仕様を踏襲して良い
--> その後、Tooltipの表示内容がSimulator Nameとパラメータリストに変更されたので、この違和感はなくなった