summaryrefslogtreecommitdiffstats
path: root/mobile/android/android-components/docs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /mobile/android/android-components/docs
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mobile/android/android-components/docs')
-rw-r--r--mobile/android/android-components/docs/_includes/header.html34
-rw-r--r--mobile/android/android-components/docs/_includes/post_detail.html22
-rw-r--r--mobile/android/android-components/docs/_layouts/post.html61
-rw-r--r--mobile/android/android-components/docs/assets/js/icon-js.js145
-rw-r--r--mobile/android/android-components/docs/changelog.md27
5 files changed, 170 insertions, 119 deletions
diff --git a/mobile/android/android-components/docs/_includes/header.html b/mobile/android/android-components/docs/_includes/header.html
index 7a989f7de9..b32fc0298d 100644
--- a/mobile/android/android-components/docs/_includes/header.html
+++ b/mobile/android/android-components/docs/_includes/header.html
@@ -2,22 +2,24 @@
<div class="wrapper">
<a class="site-title" rel="author" href="/">Mozilla Android Components</a>
- <nav class="site-nav">
- <input type="checkbox" id="nav-trigger" class="nav-trigger" />
- <label for="nav-trigger">
- <span class="menu-icon">
- <svg viewBox="0 0 18 15" width="18px" height="15px">
- <path d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.032C17.335,0,18,0.665,18,1.484L18,1.484z M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.032C17.335,6.031,18,6.696,18,7.516L18,7.516z M18,13.516C18,14.335,17.335,15,16.516,15H1.484 C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.483,1.484-1.483h15.032C17.335,12.031,18,12.695,18,13.516L18,13.516z"/>
- </svg>
- </span>
- </label>
+ <nav class="site-nav">
+ <input type="checkbox" id="nav-trigger" class="nav-trigger" />
+ <label for="nav-trigger">
+ <span class="menu-icon">
+ <svg viewBox="0 0 18 15" width="18px" height="15px">
+ <path
+ d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.032C17.335,0,18,0.665,18,1.484L18,1.484z M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.032C17.335,6.031,18,6.696,18,7.516L18,7.516z M18,13.516C18,14.335,17.335,15,16.516,15H1.484 C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.483,1.484-1.483h15.032C17.335,12.031,18,12.695,18,13.516L18,13.516z"
+ />
+ </svg>
+ </span>
+ </label>
- <div class="trigger">
- <a class="page-link" href="/components/">Components</a>
- <a class="page-link" href="/changelog/">Changelog</a>
- <a class="page-link" href="/blog/">Blog</a>
- <a class="page-link" href="/contributing/">Contributing</a>
- </div>
- </nav>
+ <div class="trigger">
+ <a class="page-link" href="/components/">Components</a>
+ <a class="page-link" href="/changelog/">Changelog</a>
+ <a class="page-link" href="/blog/">Blog</a>
+ <a class="page-link" href="/contributing/">Contributing</a>
+ </div>
+ </nav>
</div>
</header>
diff --git a/mobile/android/android-components/docs/_includes/post_detail.html b/mobile/android/android-components/docs/_includes/post_detail.html
index bceb37d5bc..2cb5a8a9cd 100644
--- a/mobile/android/android-components/docs/_includes/post_detail.html
+++ b/mobile/android/android-components/docs/_includes/post_detail.html
@@ -1,16 +1,16 @@
<h1 class="entry-title">
- <!--<a href="{{ root_url }}{{ page.url }}">{{ page.title }}</a>-->
+ <!--<a href="{{ root_url }}{{ page.url }}">{{ page.title }}</a>-->
</h1>
<ul>
- {% if post.title %}
- <li>
- {{ post.date | date: '%B %d, %Y' }}
- <br/>
- {% if post.external_url %}
- <a href="{{ post.external_url }}">{{ post.title | escape }}</a>
- {% else %}
- <a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
- {% endif %}
- </li>
+ {% if post.title %}
+ <li>
+ {{ post.date | date: '%B %d, %Y' }}
+ <br />
+ {% if post.external_url %}
+ <a href="{{ post.external_url }}">{{ post.title | escape }}</a>
+ {% else %}
+ <a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
{% endif %}
+ </li>
+ {% endif %}
</ul>
diff --git a/mobile/android/android-components/docs/_layouts/post.html b/mobile/android/android-components/docs/_layouts/post.html
index 29f841f336..cf3d23a3c5 100644
--- a/mobile/android/android-components/docs/_layouts/post.html
+++ b/mobile/android/android-components/docs/_layouts/post.html
@@ -1,38 +1,53 @@
---
layout: default
---
-<article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting">
+<article
+ class="post h-entry"
+ itemscope
+ itemtype="http://schema.org/BlogPosting"
+>
<header class="post-header">
- <h1 class="post-title p-name" itemprop="name headline">{{ page.title | escape }}</h1>
+ <h1 class="post-title p-name" itemprop="name headline">
+ {{ page.title | escape }}
+ </h1>
<p class="post-meta">
- <time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
- {%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
- {{ page.date | date: date_format }}
+ <time
+ class="dt-published"
+ datetime="{{ page.date | date_to_xmlschema }}"
+ itemprop="datePublished"
+ >
+ {%- assign date_format = site.minima.date_format | default: "%b %-d, %Y"
+ -%} {{ page.date | date: date_format }}
</time>
- {%- if page.author -%}
- -
- {% assign author = site.data.authors[page.author] %}
- <span itemprop="author" itemscope itemtype="http://schema.org/Person">
- <span class="p-author h-card" itemprop="name">
- <img src="{{ author.image }}" width="20" height="20" style="margin:5px;" />
- {{ author.name }}
- {%- if author.twitter -%}
- <a href="{{ author.twitter }}"><svg class="svg-icon" style="margin-left:10px;"><use xlink:href="{{ '/assets/minima-social-icons.svg#twitter' | relative_url }}"></use></svg></a>
- {%- endif -%}
- </span>
- </span>
+ {%- if page.author -%} - {% assign author = site.data.authors[page.author]
+ %}
+ <span itemprop="author" itemscope itemtype="http://schema.org/Person">
+ <span class="p-author h-card" itemprop="name">
+ <img
+ src="{{ author.image }}"
+ width="20"
+ height="20"
+ style="margin: 5px"
+ />
+ {{ author.name }} {%- if author.twitter -%}
+ <a href="{{ author.twitter }}"
+ ><svg class="svg-icon" style="margin-left: 10px">
+ <use
+ xlink:href="{{ '/assets/minima-social-icons.svg#twitter' | relative_url }}"
+ ></use></svg
+ ></a>
+ {%- endif -%}
+ </span>
+ </span>
{%- endif -%}
</p>
</header>
- <div class="post-content e-content" itemprop="articleBody">
- {{ content }}
- </div>
+ <div class="post-content e-content" itemprop="articleBody">{{ content }}</div>
- {%- if site.disqus.shortname -%}
- {%- include disqus_comments.html -%}
- {%- endif -%}
+ {%- if site.disqus.shortname -%} {%- include disqus_comments.html -%} {%-
+ endif -%}
<a class="u-url" href="{{ page.url | relative_url }}" hidden></a>
</article>
diff --git a/mobile/android/android-components/docs/assets/js/icon-js.js b/mobile/android/android-components/docs/assets/js/icon-js.js
index 6c5ca1a226..41ace3daf7 100644
--- a/mobile/android/android-components/docs/assets/js/icon-js.js
+++ b/mobile/android/android-components/docs/assets/js/icon-js.js
@@ -3,11 +3,11 @@
* @return {Element}
*/
function htmlToElement(html) {
- let template = document.createElement('template');
- html = html.trim(); // Never return a text node of whitespace as the result
- template.innerHTML = html;
- //firstChild may be a comment so we must use firstElementChild to avoid picking it
- return template.content.firstElementChild;
+ let template = document.createElement("template");
+ html = html.trim(); // Never return a text node of whitespace as the result
+ template.innerHTML = html;
+ //firstChild may be a comment so we must use firstElementChild to avoid picking it
+ return template.content.firstElementChild;
}
/**
@@ -17,81 +17,90 @@ function htmlToElement(html) {
* @returns {String} The same string but in the standard SVG representation
*/
function androidSVGtoNormalSVG(s) {
- s = s.replace(/<\?xml version="1\.0" encoding="utf-8"\?>/g, '');
- s = s.replace(/<vector xmlns:android="http:\/\/schemas.android.com\/apk\/res\/android"/g, '<svg xmlns="http://www.w3.org/2000/svg"');
- s = s.replace(/<\/vector>/g, '</svg>');
- s = s.replace(/android:(height|width)="(\d+)dp"/g, '');
- s = s.replace(/android:viewportHeight="(\d+\.?\d+)"/g, 'height="$1"');
- s = s.replace(/android:viewportWidth="(\d+\.?\d+)"/g, 'width="$1"');
- s = s.replace(/android:fillColor=/g, 'fill=');
- s = s.replace(/android:pathData=/g, 'd=');
- //s = s.replace(/android:/g, '');
- return s;
+ s = s.replace(/<\?xml version="1\.0" encoding="utf-8"\?>/g, "");
+ s = s.replace(
+ /<vector xmlns:android="http:\/\/schemas.android.com\/apk\/res\/android"/g,
+ '<svg xmlns="http://www.w3.org/2000/svg"'
+ );
+ s = s.replace(/<\/vector>/g, "</svg>");
+ s = s.replace(/android:(height|width)="(\d+)dp"/g, "");
+ s = s.replace(/android:viewportHeight="(\d+\.?\d+)"/g, 'height="$1"');
+ s = s.replace(/android:viewportWidth="(\d+\.?\d+)"/g, 'width="$1"');
+ s = s.replace(/android:fillColor=/g, "fill=");
+ s = s.replace(/android:pathData=/g, "d=");
+ //s = s.replace(/android:/g, '');
+ return s;
}
function addToTable(name, svg) {
- let table = document.querySelector("#preview_table > tbody");
- let row = htmlToElement("<tr></tr>");
- row.appendChild(htmlToElement("<td>" + name + "</td>"));
- let td = htmlToElement("<td></td>");
- td.appendChild(svg);
- row.appendChild(td);
- table.appendChild(row);
+ let table = document.querySelector("#preview_table > tbody");
+ let row = htmlToElement("<tr></tr>");
+ row.appendChild(htmlToElement("<td>" + name + "</td>"));
+ let td = htmlToElement("<td></td>");
+ td.appendChild(svg);
+ row.appendChild(td);
+ table.appendChild(row);
}
function addSingleItemToTable(str) {
- let table = document.querySelector("#preview_table > tbody");
- table.append(htmlToElement("<tr><td colspan='2'>" + str + "</td></tr>"))
+ let table = document.querySelector("#preview_table > tbody");
+ table.append(htmlToElement("<tr><td colspan='2'>" + str + "</td></tr>"));
}
function getFile(iconName, downloadUrl) {
- return new Promise((resolve, reject) => {
- let request = new XMLHttpRequest();
- request.open('GET', downloadUrl, true);
- request.onreadystatechange = function () {
- if (request.readyState === 4 && request.status === 200) {
- let androidXmlText = request.responseText;
- androidXmlText = androidSVGtoNormalSVG(androidXmlText);
- resolve([iconName, androidXmlText]);
- } else if (request.readyState === 4) {
- //Request completed with an error
- resolve([iconName, "<span>Error during download</span>"]);
- }
- };
- request.send(null);
- });
-
+ return new Promise((resolve, reject) => {
+ let request = new XMLHttpRequest();
+ request.open("GET", downloadUrl, true);
+ request.onreadystatechange = function () {
+ if (request.readyState === 4 && request.status === 200) {
+ let androidXmlText = request.responseText;
+ androidXmlText = androidSVGtoNormalSVG(androidXmlText);
+ resolve([iconName, androidXmlText]);
+ } else if (request.readyState === 4) {
+ //Request completed with an error
+ resolve([iconName, "<span>Error during download</span>"]);
+ }
+ };
+ request.send(null);
+ });
}
// This function recovers all icons inside the drawable folder via github API
(function getIcons() {
- let request = new XMLHttpRequest();
- request.open("GET", "https://api.github.com/repos/mozilla-mobile/android-components/contents/components/ui/icons/src/main/res/drawable", true);
- //Explicit request of the V3 version of the API
- request.setRequestHeader("Accept", "application/vnd.github.v3+json");
- request.onreadystatechange = function () {
- if (request.readyState === XMLHttpRequest.DONE && request.status === 200) {
- let response = JSON.parse(request.response);
- if (response.message) {
- //Something went wrong
- addSingleItemToTable("Error: " + response.message);
- return;
- }
- addSingleItemToTable("Loading");
- let promises = [];
- for (let i = 0; i < response.length; i++) {
- let iconName = response[i]['name'].substr(0, response[i]['name'].length - 4);
- promises.push(getFile(iconName, response[i]['download_url']));
- }
- Promise.all(promises).then((values) => {
- document.querySelector("#preview_table > tbody").innerHTML = "";
- for (let i = 0; i < values.length; i++) {
- let name = values[i][0], svg = values[i][1];
- addToTable(name, htmlToElement(svg));
- }
- });
+ let request = new XMLHttpRequest();
+ request.open(
+ "GET",
+ "https://api.github.com/repos/mozilla-mobile/android-components/contents/components/ui/icons/src/main/res/drawable",
+ true
+ );
+ //Explicit request of the V3 version of the API
+ request.setRequestHeader("Accept", "application/vnd.github.v3+json");
+ request.onreadystatechange = function () {
+ if (request.readyState === XMLHttpRequest.DONE && request.status === 200) {
+ let response = JSON.parse(request.response);
+ if (response.message) {
+ //Something went wrong
+ addSingleItemToTable("Error: " + response.message);
+ return;
+ }
+ addSingleItemToTable("Loading");
+ let promises = [];
+ for (let i = 0; i < response.length; i++) {
+ let iconName = response[i]["name"].substr(
+ 0,
+ response[i]["name"].length - 4
+ );
+ promises.push(getFile(iconName, response[i]["download_url"]));
+ }
+ Promise.all(promises).then(values => {
+ document.querySelector("#preview_table > tbody").innerHTML = "";
+ for (let i = 0; i < values.length; i++) {
+ let name = values[i][0],
+ svg = values[i][1];
+ addToTable(name, htmlToElement(svg));
}
- };
- request.send(null);
+ });
+ }
+ };
+ request.send(null);
})();
-
diff --git a/mobile/android/android-components/docs/changelog.md b/mobile/android/android-components/docs/changelog.md
index 6dce7f4966..d14bbca8c8 100644
--- a/mobile/android/android-components/docs/changelog.md
+++ b/mobile/android/android-components/docs/changelog.md
@@ -4,7 +4,32 @@ title: Changelog
permalink: /changelog/
---
-# 126.0 (In Development)
+# 127.0 (In Development)
+
+* **feature-prompts** **browser-storage-sync**
+ * A new `isLoginAutofillEnabled` callback is available in `PromptFeature` and `GeckoLoginStorageDelegate` to allow clients controlling whether saved logins should be autofilled or not. Default is false
+
+* **browser-state**
+ * Added `TabSessionState.getUrl()` extension function that will return the URL that could be
+ used for various features such as bookmarks or share regardless of the mode the browser is in (e.g. Reader mode). [Bug 1885628](https://bugzilla.mozilla.org/show_bug.cgi?id=1885628).
+
+* **support-base**
+ * Added `StartForegroundService` to safely start a foreground service, see [Bug 1839039](https://bugzilla.mozilla.org/show_bug.cgi?id=1839039) for crash reference.
+ * Added `ProcessInfoProvider` and `BuildVersionProvider` to get information about the app process and the build version.
+
+* **browser-engine-gecko**
+ * For screenshot capture, include exception in failure result rather than throwing.
+
+* **feature-accounts-push**
+ * 🆕 New `CloseTabsFeature` for closing tabs on this device from other devices that are signed to the same Mozilla account.
+ * 🆕 New `CloseTabsUseCase` for closing tabs on other devices from this device.
+
+* **concept-sync**
+ * 🆕 New `DeviceCapability.CLOSE_TABS` variant to indicate that a device supports closing synced tabs.
+ * 🆕 New `DeviceCommandIncoming.TabsClosed` variant to represent a "close synced tabs" command received from another device.
+ * 🆕 New `DeviceCommandOutgoing.CloseTab` variant to represent a "close synced tabs" sent to another device.
+
+# 126.0
* **browser-menu**
* Added enabled state to `BrowserMenuImageText`, see [Bug 1884769](https://bugzilla.mozilla.org/show_bug.cgi?id=1884769).