Giter Site home page Giter Site logo

kaaveh / composenews Goto Github PK

View Code? Open in Web Editor NEW
276.0 276.0 46.0 21.16 MB

A playground about best practices, using updated libraries and solutions in the Android world!

License: Apache License 2.0

Kotlin 99.00% Ruby 0.24% Shell 0.76%
android architecture best-practices hacktoberfest jetpack-compose

composenews's Introduction

composenews's People

Contributors

alibahaaa avatar amjadima avatar beradeep avatar dekan avatar hossein69ameri avatar kaaveh avatar kanake10 avatar kooroshma avatar mahdiabbasian avatar maryammohamedi avatar mhmd-android avatar mohammadrezaei92 avatar mohammadsianaki avatar rubenquadros avatar sajjad-dehnavi avatar utkarsh006 avatar vahidgarousi 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

composenews's Issues

[Discussion] Coupling codes when using base classes

I think we shouldn't use base classes like: BaseContract, BaseScreen and BaseViewModel.
Just keep it separated like in the medium article.
Maybe those base classes all work in the current codebase but when it is expanded, we will be confused to use they or not and use for what.

[Feature Suggestion] Sort Markets

Description

I suggest the addition of a sorting feature, allowing users to arrange markets either by price or by name, in both ascending and descending order. This enhancement would greatly improve the user experience.

Technical Considerations:

  1. Strategy Design Pattern: We can utilize the Strategy design pattern, where each sorting strategy (e.g., by price, by name) is encapsulated in its own class. These sorting strategy classes should adhere to a common interface, allowing easy integration into the sorting system.

  2. Pluggable Architecture: Design the sorting system to be pluggable, allowing new sorting strategies to be added as separate modules without touching the core sorting logic. This promotes the idea of extending the system without modifying existing code.

  3. Unit Testing: Ensure that each sorting strategy is independently testable. Write unit tests for each strategy to validate their correctness. This will prevent regressions when new strategies are added.

Adding ktlint.

Ktlint allows us to ensure our codebase is formatted properly.

Tablet & foldable view

Hi
I do some research about adaptive views in Jetpack Compose. So I think I know how to do this task. If it's Ok I'm ready to do that.

Adding Danger.

Danger allows us to automate some pull request chores.

Adding detekt

Adding Detekt allows us to ensure we have no code smells or other complexities.

[bugfix] ci

.github/workflows/ci.yaml: No jobs were run
Error: .github#L1
the `uses' attribute must be a path, a Docker image, or owner/repo@ref

.github/workflows/dependabot.yml: No jobs were run
Error: .github#L1
No event triggers defined in on

[refactor] use `DevicesPreviews`

In the MainActivity there is code:

@OptIn(ExperimentalMaterial3WindowSizeClassApi::class)
@Preview(showBackground = true, widthDp = 700, heightDp = 500)
@Composable
fun ComposeNewsAppPreviewTablet() {
    ComposeNewsTheme {
        ComposeNewsApp(
            windowSize = WindowSizeClass.calculateFromSize(DpSize(700.dp, 500.dp)),
            displayFeatures = emptyList(),
            uiState = MainContract.State(),
            closeDetailScreen = {},
        )
    }
}

@OptIn(ExperimentalMaterial3WindowSizeClassApi::class)
@Preview(showBackground = true, widthDp = 500, heightDp = 700)
@Composable
fun ComposeNewsAppPreviewTabletPortrait() {
    ComposeNewsTheme {
        ComposeNewsApp(
            windowSize = WindowSizeClass.calculateFromSize(DpSize(500.dp, 700.dp)),
            displayFeatures = emptyList(),
            uiState = MainContract.State(),
            closeDetailScreen = {},
        )
    }
}

@OptIn(ExperimentalMaterial3WindowSizeClassApi::class)
@Preview(showBackground = true, widthDp = 1100, heightDp = 600)
@Composable
fun ComposeNewsAppPreviewDesktop() {
    ComposeNewsTheme {
        ComposeNewsApp(
            windowSize = WindowSizeClass.calculateFromSize(DpSize(1100.dp, 600.dp)),
            displayFeatures = emptyList(),
            uiState = MainContract.State(),
            closeDetailScreen = {},
        )
    }
}

@OptIn(ExperimentalMaterial3WindowSizeClassApi::class)
@Preview(showBackground = true, widthDp = 600, heightDp = 1100)
@Composable
fun ComposeNewsAppPreviewDesktopPortrait() {
    ComposeNewsTheme {
        ComposeNewsApp(
            windowSize = WindowSizeClass.calculateFromSize(DpSize(600.dp, 1100.dp)),
            displayFeatures = emptyList(),
            uiState = MainContract.State(),
            closeDetailScreen = {},
        )
    }
}

Replace it with DevicesPreviews defined in designsystem module

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.