GithubHelp home page GithubHelp logo

mozilla-mobile / android-components Goto Github PK

View Code? Open in Web Editor NEW
2.0K 87.0 475.0 86.91 MB

⚠️ This project moved to a new repository. It is now developed and maintained at: https://github.com/mozilla-mobile/firefox-android

Home Page: https://github.com/mozilla-mobile/firefox-android

License: Mozilla Public License 2.0

Kotlin 94.01% HTML 0.05% CSS 0.23% Java 0.06% Python 0.82% Dockerfile 0.05% Shell 0.16% JavaScript 4.47% Groovy 0.15%
android components browser mozilla kotlin

android-components's People

Contributors

amejia481 avatar badboy avatar boek avatar csadilek avatar dector avatar denschub avatar dexterp37 avatar ekager avatar eoger avatar fercarcedo avatar gabrielluong avatar georgf avatar jhugman avatar johanlorenzo avatar jonalmeida avatar mcarare avatar mcomella avatar mdboom avatar mickeymoz avatar mozilla-l10n-automation-bot avatar mozlando avatar mugurell avatar notwoods avatar pike avatar pocmo avatar psymoon avatar rocketsroger avatar sblatz avatar st3fan avatar travis79 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-components's Issues

Setup continous integration and deployment

Continuous integration

  • Create basic build configuration
  • Run tests in automation
  • Create custom docker image with all dependencies
  • Run code quality tools (at least lint, detekt and ktlint)
    • detekt
    • lint
    • ktlint
  • Save reports in artifacts

Release configuration

  • Create centralized configuration for releases (version number, ..)

Deployment

  • On successful master push: Deploy snapshot to Sonatype OSS -> #35
  • On successful release tag: Deploy release to jcenter -> #36

┆Issue is synchronized with this Jira Task

DownloadUtils: Unnecessary non-null assertion

Just saw that while building:

w: components/support/utils/src/main/java/mozilla/components/utils/DownloadUtils.kt: (133, 36):
 Unnecessary non-null assertion (!!) on a non-null receiver of type String
w: components/support/utils/src/main/java/mozilla/components/utils/DownloadUtils.kt: (133, 36):
 Unnecessary non-null assertion (!!) on a non-null receiver of type String

┆Issue is synchronized with this Jira Task

Cleanup error pages CSS

Our CSS seems to contain a lot of stuff from Firefox for Android that is not really used by our error pages.

┆Issue is synchronized with this Jira Task

Collect all reports to archive them on taskcluster

We want to save all the reports from detekt, ktlint, unit tests etc. as artifacts on taskcluster. With that anyone can inspect them without needing to re-run the commands locally.

Every module stores them in its own build folder. Initially I tried to list them all in taskcluster.yml. But this is error-prone and the list is already outdated:
https://github.com/mozilla-mobile/android-components/blob/master/.taskcluster.yml#L34

Unfortunately taskcluster doesn't allow wildcards in artifact lists.

Instead we should write a little python script that:

  • Creates a reports folder in the root of the project
  • Dynamically goes through the modules and copies the reports of the modules into the reports folder (reports/$module-name/...)
  • ... and then we just add the reports folder as artifact.

┆Issue is synchronized with this Jira Task

Convert WebURLFinder to Kotlin

This file was imported from Firefox for Android and has not been converted to Kotlin yet. We may not only want to convert it automatically but turn it into something that makes more sense in Kotlin.

┆Issue is synchronized with this Jira Task

Module: ui-doorhanger

A generic UI component that can display a "door hanger UI" that can get "attached" to a specific view. The actual layout of the doorhanger should be defined by the code using the component.

Examples:

  • Click on lock icon in Fennec
  • Web content permission requests in Fennec

Compare Fennec on phones and tablets.

┆Issue is synchronized with this Jira Task

Remove "Utils" suffix from filenames

The official Kotlin coding conventions mention:

The name of the file should describe what the code in the file does. Therefore, you should avoid using meaningless words such as "Util" in file names.

I've found that most Utils can be moved to extension functions and the remaining functions usually fit into a few different objects that better describe what the functions do like, BitmapResizer or ThreadRunner (.postToUiThread...)

┆Issue is synchronized with this Jira Task

Add sample: browser skeleton

I would like to add some samples to this repository. One obvious choice is a simple browser skeleton sample app that uses some of our components.

This sample will be helpful to show how the components are used; but I also hope that it will help us to develop and test the components in a "real" application.

┆Issue is synchronized with this Jira Task

Feature: History

Some requirements:

  • Storage (Can be temporary solution; But let's explore interfaces we need)
  • Suggestions from history (-> Showing additional components based on toolbar state)
  • Autocompletion from history (-> Interaction with toolbar component) (milestone 3)

┆Issue is synchronized with this Jira Task

Be smarter about logging

We imported some Firefox for Android code with random Log.* statements.

How can we avoid logging random things in the app's log? How can the app control this?

Some thoughts:

  • Do we need to log from components at all? Could we avoid this completely?
  • Do we need a log component for our apps? Could components hook into that?
  • How can we make sure that the consumer is in control?

┆Issue is synchronized with this Jira Task

detekt: Fix issues and remove baseline

We generated a detekt-baseline.xml file to suppress all already existing code smells. Let's fix them (or suppress them in code) and then get rid of the baseline file.

┆Issue is synchronized with this Jira Task

Enable sputnik for pull requests

Sputnik runs the same tools we run on taskcluster; but it comments inline on code in PRs. That's pretty nice and like an automated review.

Focus uses travis to trigger sputnik. I would like to do this from taskcluster now.

┆Issue is synchronized with this Jira Task

Centralize support library version configuration

Some components will depend on a subset of Android's support libraries. We should centralize the configuration of the version so that all components use the same version. In addition to that we should document in the release notes which version we compiled against.

┆Issue is synchronized with this Jira Task

Add new component: browser-search

A new component that contains:

  • Search plugins
  • Search configuration
  • Code to represent and use search engines
  • Code to load, parse and manage search engines

Additional tasks:

  • Re-import search plugins
  • Parse list.json instead of own file
  • Allow multiple sources to be added to SearchEngineManager

┆Issue is synchronized with this Jira Task

Publish task only uploaded POM

It looks like the publish task only uploaded the POM file to the correct directory.

On bintray I can see that the AAR and sources JAR have been uploaded to different folders:

POM:

  • /org/mozilla/components/ktx/0.2.1

AAR/JAR:

  • /org/mozilla/components/support-ktx/0.2.1

It seems to use the gradle module name (support-ktx) instead of the artifact name.

┆Issue is synchronized with this Jira Task

Add README files

Add README file to the root directory and all component directories.

  • Explain what this is
  • Explain structure
  • Explain each component

┆Issue is synchronized with this Jira Task

concept-engine: Dialog requests

To define: Should every engine implementation deal with that or should we introduce interfaces for that in the concept module? Let's investigate how GeckoView and WebView want their consumers to handle this.

┆Issue is synchronized with this Jira Task

Support specifying the custom domain list in DomainAutoCompleteProvider.kt

With the current implementation of DomainAutoCompleteProvider.kt it is loading the list of custom URLs from disk.

While working on mozilla-mobile/focus-android#2000I'm running into a problem where I want to be able to save the full URL in CustomDomains but be able to strip out the protocol and www to allow the user to continue to autocomplete without having to type out the protocol first.

image

But be able to switch to the full URL they saved when they submit the field.

┆Issue is synchronized with this Jira Task

How to incorporate L10N?

Some of the strings that need to be translated may be defined in (UI) components. How do we translate them?

  • Should the components project be something that gets translated?
  • Should only the app be responsible for translations?

┆Issue is synchronized with this Jira Task

detekt: Enable Comments.UndocumentedPublicClass

Libraries should have javadoc comments for all public classes. Detekt has a check for that.

In order to enable this we'd need add comments to those classes:

UndocumentedPublicClass - [AutocompleteResult] at components/ui/autocomplete/src/main/java/mozilla/components/ui/autocomplete/InlineAutocompleteEditText.kt:63:5
UndocumentedPublicClass - [ErrorPages] at components/browser/errorpages/src/main/java/mozilla/components/browser/errorpages/ErrorPages.kt:11:1
UndocumentedPublicClass - [AutocompleteSource] at components/browser/domains/src/main/java/mozilla/components/browser/domains/DomainAutoCompleteProvider.kt:22:5
UndocumentedPublicClass - [SearchEngineManager] at components/browser/search/src/main/java/mozilla/components/browser/search/SearchEngineManager.kt:14:1
UndocumentedPublicClass - [ThreadUtils] at components/support/utils/src/main/java/mozilla/components/support/utils/ThreadUtils.kt:12:1
UndocumentedPublicClass - [DownloadUtils] at components/support/utils/src/main/java/mozilla/components/support/utils/DownloadUtils.kt:31:1
UndocumentedPublicClass - [DrawableUtils] at components/support/utils/src/main/java/mozilla/components/support/utils/DrawableUtils.kt:13:1
UndocumentedPublicClass - [ColorUtils] at components/support/utils/src/main/java/mozilla/components/support/utils/ColorUtils.kt:9:1
UndocumentedPublicClass - [StatusBarUtils] at components/support/utils/src/main/java/mozilla/components/support/utils/StatusBarUtils.kt:9:1

┆Issue is synchronized with this Jira Task

Lazily instantiate ThreadUtils background executor

In ThreadUtils, we create a background executor service. This means that when the object is loaded (which I assume is the first time the class is used), we'll have an idle thread consuming resources even if the project doesn't use it. Instead, we should lazily instantiate the background executor.

┆Issue is synchronized with this Jira Task

Use Case: Show loading progress

  • Toolbar: Add ability to display progress
  • Session: Make progress (boolean) available
  • Engine: Expose progress
  • Glue code in feature-session.

┆Issue is synchronized with this Jira Task

Module: browser-menu

To be used by browser-toolbar.

Needs to allow dynamic composition. Other components might want to hook into it (but only if it exists).

┆Issue is synchronized with this Jira Task

detekt: Enable Comments.UndocumentedPublicFunction

Libraries should have javadoc comments for all public functions. Detekt has a check for that.

In order to enable this we'd need add comments to those functions:

UndocumentedPublicFunction - [emptyResult] at components/ui/autocomplete/src/main/java/mozilla/components/ui/autocomplete/InlineAutocompleteEditText.kt:70:13
UndocumentedPublicFunction - [setOnCommitListener] at components/ui/autocomplete/src/main/java/mozilla/components/ui/autocomplete/InlineAutocompleteEditText.kt:75:5
UndocumentedPublicFunction - [setOnFilterListener] at components/ui/autocomplete/src/main/java/mozilla/components/ui/autocomplete/InlineAutocompleteEditText.kt:78:5
UndocumentedPublicFunction - [setOnSearchStateChangeListener] at components/ui/autocomplete/src/main/java/mozilla/components/ui/autocomplete/InlineAutocompleteEditText.kt:81:5
UndocumentedPublicFunction - [setOnTextChangeListener] at components/ui/autocomplete/src/main/java/mozilla/components/ui/autocomplete/InlineAutocompleteEditText.kt:84:5
UndocumentedPublicFunction - [setOnKeyPreImeListener] at components/ui/autocomplete/src/main/java/mozilla/components/ui/autocomplete/InlineAutocompleteEditText.kt:87:5
UndocumentedPublicFunction - [setOnSelectionChangedListener] at components/ui/autocomplete/src/main/java/mozilla/components/ui/autocomplete/InlineAutocompleteEditText.kt:90:5
UndocumentedPublicFunction - [setOnWindowsFocusChangeListener] at components/ui/autocomplete/src/main/java/mozilla/components/ui/autocomplete/InlineAutocompleteEditText.kt:93:5
UndocumentedPublicFunction - [<UnknownName>] at components/ui/autocomplete/src/main/java/mozilla/components/ui/autocomplete/InlineAutocompleteEditText.kt:122:31
UndocumentedPublicFunction - [<UnknownName>] at components/ui/autocomplete/src/main/java/mozilla/components/ui/autocomplete/InlineAutocompleteEditText.kt:146:25
UndocumentedPublicFunction - [<UnknownName>] at components/ui/autocomplete/src/main/java/mozilla/components/ui/autocomplete/InlineAutocompleteEditText.kt:162:38
UndocumentedPublicFunction - [toSearchEngine] at components/browser/search/src/main/java/mozilla/components/browser/search/SearchEngineParser.kt:35:9
UndocumentedPublicFunction - [load] at components/browser/search/src/main/java/mozilla/components/browser/search/SearchEngineParser.kt:44:5
UndocumentedPublicFunction - [load] at components/browser/search/src/main/java/mozilla/components/browser/search/SearchEngineManager.kt:20:5
UndocumentedPublicFunction - [onValueAdded] at components/browser/session/src/main/java/mozilla/components/browser/session/ObservableList.kt:93:9
UndocumentedPublicFunction - [onValueRemoved] at components/browser/session/src/main/java/mozilla/components/browser/session/ObservableList.kt:94:9
UndocumentedPublicFunction - [onValueSelected] at components/browser/session/src/main/java/mozilla/components/browser/session/ObservableList.kt:95:9
UndocumentedPublicFunction - [onUrlChanged] at components/browser/session/src/main/java/mozilla/components/browser/session/Session.kt:17:9
UndocumentedPublicFunction - [postToBackgroundThread] at components/support/utils/src/main/java/mozilla/components/support/utils/ThreadUtils.kt:18:5
UndocumentedPublicFunction - [postToMainThread] at components/support/utils/src/main/java/mozilla/components/support/utils/ThreadUtils.kt:22:5
UndocumentedPublicFunction - [postToMainThreadDelayed] at components/support/utils/src/main/java/mozilla/components/support/utils/ThreadUtils.kt:26:5
UndocumentedPublicFunction - [assertOnUiThread] at components/support/utils/src/main/java/mozilla/components/support/utils/ThreadUtils.kt:30:5
UndocumentedPublicFunction - [getString] at components/support/utils/src/main/java/mozilla/components/support/utils/SafeBundle.kt:20:5
UndocumentedPublicFunction - [getParcelable] at components/support/utils/src/main/java/mozilla/components/support/utils/SafeBundle.kt:32:5
UndocumentedPublicFunction - [hasExtra] at components/support/utils/src/main/java/mozilla/components/support/utils/SafeIntent.kt:86:5
UndocumentedPublicFunction - [getBooleanExtra] at components/support/utils/src/main/java/mozilla/components/support/utils/SafeIntent.kt:98:5
UndocumentedPublicFunction - [getIntExtra] at components/support/utils/src/main/java/mozilla/components/support/utils/SafeIntent.kt:110:5
UndocumentedPublicFunction - [getStringExtra] at components/support/utils/src/main/java/mozilla/components/support/utils/SafeIntent.kt:122:5
UndocumentedPublicFunction - [getBundleExtra] at components/support/utils/src/main/java/mozilla/components/support/utils/SafeIntent.kt:134:5
UndocumentedPublicFunction - [getCharSequenceExtra] at components/support/utils/src/main/java/mozilla/components/support/utils/SafeIntent.kt:151:5
UndocumentedPublicFunction - [getParcelableExtra] at components/support/utils/src/main/java/mozilla/components/support/utils/SafeIntent.kt:163:5
UndocumentedPublicFunction - [getParcelableArrayListExtra] at components/support/utils/src/main/java/mozilla/components/support/utils/SafeIntent.kt:175:5
UndocumentedPublicFunction - [getStringArrayListExtra] at components/support/utils/src/main/java/mozilla/components/support/utils/SafeIntent.kt:187:5
UndocumentedPublicFunction - [onLocationChange] at components/concept/engine/src/main/java/mozilla/components/concept/engine/EngineSession.kt:19:9

┆Issue is synchronized with this Jira Task

Add component: Roboto fontFamily names

We often use the Roboto font family in our products, which the designers typically specify as, "Roboto Medium", "Roboto Regular", etc. However, in Android, these are "sans-serif-medium" and "san-serif" respectively. What a pain!

We can work around this by specifying fonts as strings. The solution is via SO and we use it in focus:

<resources>
    <string name="font_roboto_medium">sans-serif-medium</string>
    <string name="font_roboto_regular">sans-serif</string>
</resources>

And usage:

android:fontFamily="string/font_roboto_medium"

Let's keep this consistent across our products!

┆Issue is synchronized with this Jira Task

Do not depend on local.properties

Our publish script currently tries to read local.properties. If this file does not exist then our build fails. This is especially annoying because most users of this repository won't publish anything to a maven repository themselves.

┆Issue is synchronized with this Jira Task

How can we incorporate telemetry without making it a requirement for consumers?

If you look at our current set of monolith apps then you will see that telemetry UI probes are scattered all over the code base. A reasonable chunk of the code emitting those telemetry events will be inside our components. How can we make sure that consuming apps can send telemetry events they are interested in without forcing something on all consumers using the app.

Some thoughts:

  • Could we unify the telemetry events across all apps? (e.g. one standard event for "Open toolbar menu" that is the same for all apps)
  • How can we make sure the app is in control what is send and how?

┆Issue is synchronized with this Jira Task

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.