Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

Load local html content about third-party software licenses #221

Merged
merged 7 commits into from
Jul 30, 2021

Conversation

keiji
Copy link
Collaborator

@keiji keiji commented Jun 11, 2021

Issue 番号 / Issue ID

目的 / Purpose

バージョンによって使用しているソフトウェアやフォントが変わってきている。「このバージョンからはこのライブラリ」や「このライブラリはこのバージョンまで」のような記述が重なると読みにくくなり、過去に廃止したライブラリを再度使うなどのケースで更新ミスが起こる可能性がある。

本Pull Requestは、ライセンス情報をアプリに同梱してバージョンに紐付けることで、今後のライセンス情報の更新を容易にする。

破壊的変更をもたらしますか / Does this introduce a breaking change?

[x] Yes
[ ] No

Pull Request の種類 / Pull Request type

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

検証方法 / How to test

コードの入手 / Get the code

gh pr checkout 221
dotnet restore

コードの検証 / Test the code

CIの実行結果 https://github.com/keiji/cocoa/actions/runs/926973006

確認事項 / What to check

コメントにて一定の方針が決まっているため解決とする。

  • ライセンスファイルCOPYRIGHT_THIRD_PARTY_SOFTWARE_NOTICES.htmlは動作イメージを見るためのダミー。ファイルの生成は、MarkdownファイルからGitHub Flavorで行っている。
  • ライセンスファイルの名前COPYRIGHT_THIRD_PARTY_SOFTWARE_NOTICES.htmlは、元になったMarkdownファイルと同じにしている。
  • ライセンスファイルの置き場所
    • Androidのassetsの直下においても良いか。iOSのようにContentディレクトリに配置するか。
    • iOSのResources/Contentの下に置くので問題ないか。ファイルが一つしかないのでContentを作らないパターンの方がわかりやすい可能性がある。
  • ライセンス関係のファイル名がLicenseAgreement*になっているが、この画面に同意の意味合いはないのでこれはLicense*にした方が良いのではないか(リファクタリングとして別途対応するか検討)。

その他 / Other information

ライセンス表記については別途Pull Request #184 がある。

@keiji keiji self-assigned this Jun 11, 2021
@@ -0,0 +1,1413 @@
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><style>body {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

COPYRIGHT_THIRD_PARTY_SOFTWARE_NOTICES.md を元に生成しているため、現在のCOCOAが表示しているウェブ版の内容と異なる。

マージ前に差し替えが必要。

@keiji keiji requested a review from cocoa-dev June 11, 2021 02:07
@keiji keiji force-pushed the load_license_from_local_resource branch from 3c9928a to 7abea54 Compare July 11, 2021 03:01
@keiji
Copy link
Collaborator Author

keiji commented Jul 11, 2021

rebased

@keiji keiji force-pushed the load_license_from_local_resource branch from 7abea54 to 7d5601f Compare July 13, 2021 16:02
@keiji keiji force-pushed the load_license_from_local_resource branch from 3c7d29a to 293d11c Compare July 14, 2021 07:53
Copy link
Contributor

@cocoa-dev cocoa-dev left a comment

Choose a reason for hiding this comment

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

@keiji

ライセンス関係のファイル名がLicenseAgreement*になっているが、この画面に同意の意味合いはないのでこれはLicense*にした方が良いのではないか(リファクタリングとして別途対応するか検討)。

私も同意です。
ただ今回の修正とは関係ないので、別 Issue & PR にしていただけると嬉しいです!

@cocoa-dev
Copy link
Contributor

@keiji

ライセンスファイルの置き場所
Androidのassetsの直下においても良いか。iOSのようにContentディレクトリに配置するか。
iOSのResources/Contentの下に置くので問題ないか。ファイルが一つしかないのでContentを作らないパターンの方がわかりやすい可能性がある。

[修正任意]
どちらでもいいと思いますが、iOS と Android で統一したほうがわかりやすいです。
仰る通りまだファイルが 1 つしかないので、両 OS とも Resources 直下に置いてよさそうです。
増えたらフォルダを作成すればいいと思います。

Rename LocalContentPathService class to LocalContentService.
The generated file name `COPYRIGHT_THIRD_PARTY_SOFTWARE_NOTICES.html` is now simplified `license.html`.
Remove a key `licenseFilename` in settings.json.
@keiji keiji requested a review from cocoa-dev July 28, 2021 07:29
keiji and others added 3 commits July 28, 2021 19:08
Co-authored-by: cocoa-dev <69558847+cocoa-dev@users.noreply.github.com>
Co-authored-by: cocoa-dev <69558847+cocoa-dev@users.noreply.github.com>
@keiji keiji requested a review from cocoa-dev July 28, 2021 12:32
Copy link
Contributor

@cocoa-dev cocoa-dev left a comment

Choose a reason for hiding this comment

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

LGTM :)
ライセンス情報を最新に更新したらマージしていいと思います!

@keiji
Copy link
Collaborator Author

keiji commented Jul 29, 2021

今のライセンスファイルは、最新のCOPYRIGHT_THIRD_PARTY_SOFTWARE_NOTICES.mdから生成したものなので、現在のCOCOAのコードに適合しているという認識です。

お昼頃にマージします。

@@ -0,0 +1,15 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ライセンス通知ヨシッ

@@ -0,0 +1,13 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ライセンス通知ヨシッ

@@ -0,0 +1,16 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ライセンス通知ヨシッ

@keiji keiji merged commit 84b00bd into cocoa-mhlw:develop Jul 30, 2021
@keiji keiji deleted the load_license_from_local_resource branch August 19, 2021 03:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants