Repository navigation
ADFA-6655 | Update Icons Repository to upstream 2.0.3 and add in-app help #165
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
Open
jimturner-adfa
wants to merge
9
commits into
main
Choose a base branch
from
ADFA-6655-update-icons-repository-plugin
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b6cfeb7
ADFA-6655 | Import Icons Repository source from upstream e083ffa
yaturner 5bd844e
ADFA-6655 | Reapply addons fixes on top of upstream 2.0.3
yaturner 510645f
ADFA-6655 | Detach the icons adapter when the fragment view is destroyed
yaturner c96c995
ADFA-6655 | Add in-app help to Icons Repository
yaturner 257e5d1
ADFA-6655 | Show the text fields' icons so their tooltips can be reached
yaturner 7fc21b1
ADFA-6655 | Never overwrite a drawable on import, and default to :app
yaturner 74b5168
ADFA-6655 | Build against the host's Material 1.12.0
yaturner f9a7639
Merge branch 'main' into ADFA-6655-update-icons-repository-plugin
jimturner-adfa 0d1e3e4
ADFA-6655 | Tighten import targets and the skip check (CodeRabbit)
yaturner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 105 additions & 0 deletions
105
plugins/Icons-Repository/src/main/assets/docs/index.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="utf-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| <title>Icons Repository guide</title> | ||
| <style> | ||
| body { | ||
| background: #ffffff; | ||
| color: #000000; | ||
| font-family: sans-serif; | ||
| line-height: 1.5; | ||
| margin: 0 auto; | ||
| max-width: 760px; | ||
| padding: 16px; | ||
| } | ||
| h1, h2, p, li, td, th { color: #000000; } | ||
| code { | ||
| background: #f2f2f2; | ||
| color: #000000; | ||
| padding: 0 3px; | ||
| } | ||
| table { border-collapse: collapse; width: 100%; } | ||
| th, td { border: 1px solid #999999; padding: 6px; text-align: left; vertical-align: top; } | ||
| </style> | ||
| </head> | ||
| <body> | ||
|
|
||
| <h1>Icons Repository guide</h1> | ||
| <p> | ||
| Icons Repository adds Material icons to your project as vector drawables, from inside | ||
| Code on the Go. The whole catalog is bundled with the plugin, so it works offline. | ||
| </p> | ||
|
|
||
| <h2 id="open">Opening the catalog</h2> | ||
| <p> | ||
| Tap <b>Icons Repository</b> in the side menu. The catalog opens as an editor tab with a | ||
| grid of icons. The first time it opens, the icons take a moment to load. | ||
| </p> | ||
|
|
||
| <h2 id="search">Searching icons</h2> | ||
| <p> | ||
| Type in the search field to filter the grid by icon name, for example <code>arrow</code>, | ||
| <code>home</code> or <code>settings</code>. Tap the clear button at the end of the field to | ||
| show every icon again. | ||
| </p> | ||
|
|
||
| <h2 id="import">Importing an icon</h2> | ||
| <p>Tap an icon to open the import dialog. The preview at the top shows the icon with the chosen tint.</p> | ||
| <table> | ||
| <tr><th>Field</th><th>What it does</th></tr> | ||
| <tr id="name"> | ||
| <td>Icon name</td> | ||
| <td> | ||
| The drawable's resource name and file name. Use lowercase letters, digits and | ||
| single underscores, starting with a letter and not ending with an underscore, for | ||
| example <code>ic_arrow_back</code>. Java keywords such as <code>class</code> are | ||
| not allowed. The name starts filled in from the icon's name. | ||
| </td> | ||
| </tr> | ||
| <tr id="module"> | ||
| <td>Target module</td> | ||
| <td> | ||
| Which module receives the icon. The dialog starts on <code>:app</code>. | ||
| <b>All modules</b> writes a copy into every Android module the plugin finds: a folder | ||
| with a build file, <code>src/main</code>, and an Android manifest or Android plugin. | ||
| </td> | ||
| </tr> | ||
| <tr id="color"> | ||
| <td>Color</td> | ||
| <td> | ||
| The tint. <b>None</b> leaves the icon untinted, so it draws in black. A theme color | ||
| such as <code>colorPrimary</code> is written as <code>?attr/colorPrimary</code>, | ||
| so the icon follows your app's theme. <b>Custom</b> shows a field for a hex value in | ||
| <code>#RRGGBB</code> or <code>#AARRGGBB</code> form. | ||
| </td> | ||
| </tr> | ||
| </table> | ||
| <p> | ||
| Tap <b>Import</b> to write the icon. If the name or color is not valid, the field shows | ||
| an error and nothing is written. <b>Cancel</b> closes the dialog without changing | ||
| anything. | ||
| </p> | ||
|
|
||
| <h2 id="result">What gets written</h2> | ||
| <p> | ||
| Each import writes one file, <code>res/drawable/<name>.xml</code>, in the main source | ||
| set of each target module. It is a 24dp vector drawable, and you use it like any other | ||
| drawable, for example <code>@drawable/ic_arrow_back</code> in a layout or | ||
| <code>R.drawable.ic_arrow_back</code> in code. | ||
| </p> | ||
| <p> | ||
| <b>An existing drawable is never replaced.</b> A module whose <code>res/drawable</code> | ||
| already has a drawable with that name, in any format (for example <code>ic_home.png</code>), | ||
| is skipped, and the dialog lists the skipped files. Pick a new name to import it there. | ||
| </p> | ||
|
|
||
| <h2 id="help">Getting help</h2> | ||
| <p> | ||
| Long-press the search icons, an icon in the grid, a button or list in the import dialog, or a | ||
| field's icon, to see a short explanation of it. Long-pressing the text of a field selects it. | ||
| </p> | ||
|
|
||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
MINOR: The licence is still unclear, and this PR brings in a new block of upstream code under it.
This line is still the template placeholder.
addon.jsonsays AGPL-3.0-or-later, upstream's README shows an MIT badge, and upstream has no LICENSE file.material_icon.zipships no licence or notice either.Get an explicit licence from the upstream author, make
addon.jsonand this README agree with it, and ship the icon set's licence or NOTICE with the assets.