8432 Commits

Author SHA1 Message Date
MohitMaliFtechiz
dd45b8a612 Fixed: The swipeRefreshIndicator is showing when disabling the SwipeRefreshLayout.
* Implemented rememberLazyListScrollListener to efficiently handle scrolling events. It triggers onScrollChanged only when the scroll direction changes, reducing unnecessary event triggers and recompositions. This improves performance and allows reuse across multiple screens.
* Refactored KiwixAppBar to optionally auto-hide and show based on scroll behavior when a LazyListState is provided. Simply pass the LazyListState where scrolling behavior is needed, and the toolbar will automatically hide/show as the user scrolls. If no LazyListState is passed, it functions as a standard toolbar.
2025-03-20 19:37:23 +05:30
MohitMaliFtechiz
80fbf74d9a Created LocalLibraryScreenState to encapsulate all UI-related states, reducing state management's complexity. 2025-03-19 17:33:35 +05:30
MohitMaliFtechiz
5b507d8f3d Improved the visibility of permissionDeniedLayout when permission is denied.
* Improved the display of the ZIM file list when permission is granted.
* Displaying the snackBar with Compose UI when there is not enough storage to copy the ZIM file.
* Created the `SwipeRefreshLayout` according to our theme, along with custom logic to enable or disable it, since the default PullToRefresh does not support this feature.
* Created `ContentLoadingProgressBar` to show circular and horizontal progress bars with progress, styled according to our theme.
2025-03-19 15:01:34 +05:30
MohitMaliFtechiz
de46b8f0dd Fixed the clicks on ZIMFile was not working.
* Improved the logic to detect the current running application is a custom app or not.
* Removed the unused code from `LocalLibraryFragment`.
2025-03-18 20:07:59 +05:30
MohitMaliFtechiz
9be780b863 Migrated the LocalLibraryFragment to jetpack.
* Created `LocalLibraryScreen` for compose UI.
* Refactored the `LocalLibraryFragment` functionality with compose.
* Minor refinement in `KiwixAppBar` for title and hamburger icon.
2025-03-18 18:50:53 +05:30
MohitMaliFtechiz
a72d021e95 Refactored the ZimHostFragmentTest according to compose. 2025-03-15 16:10:36 +05:30
MohitMaliFtechiz
6e370a1e74 Fixed: The server was not starting automatically after granting notification/storage permissions, whereas it previously started automatically with the XML-based design.
* Fixed: The link was not clickable and was only displaying as plain text in the TextView.
* Fixed: The TagView UI was not adjusting properly when all tags were displayed.
Fixed: The TagView was not positioned at the bottom and had an unintended bottom margin.
* Fixed: The fonts and sizes of the date, article size, and description were not aligned with our current XML design.
* Fixed: The ZIM files list was not updating on the UI when selecting/deselecting items.
* Removed the `activity_zim_host.xml` file from project since it is unused now.
2025-03-15 13:56:54 +05:30
MohitMaliFtechiz
436a001eb9 Refined the TagView to align with our current night/day theme.
* Adjusted the position of ZimFilesLanguageHeader to match the XML-based layout.
Improved the BookItem design by refining the width and height of the ZIM favicon and adjusting its position. Additionally, fixed an issue where icons were being converted to black and white instead of displaying the original favicon.
* Added a new color (surfaceContainer) to our theme, which will be used for all cards in the application. This ensures that card colors automatically adapt to the current night/day theme.
2025-03-13 19:17:08 +05:30
MohitMaliFtechiz
29d0215984 Refactored the ZimHostFragment to use the ZimHostScreen instead of XML layout. 2025-03-13 15:41:15 +05:30
MohitMaliFtechiz
b608b838a3 Created the TagsView for showing the books tags. 2025-03-13 15:40:03 +05:30
MohitMaliFtechiz
674ff5b24c Refined the BookItem for better readability and maintainability.
* Created `ZimFileLanguageHeader` for showing the languages of ZIM files.
2025-03-13 15:39:05 +05:30
MohitMaliFtechiz
7cdcc0d021 Improved the naming of IconItem's item for better understanding. 2025-03-13 15:34:49 +05:30
MohitMaliFtechiz
a29c33327d Created a Book extension to convert the favicon into a Compose Painter. The previous implementation remains unchanged; if no favicon is available, it will load the default ZIM icon. 2025-03-12 18:00:42 +05:30
MohitMaliFtechiz
31fe534325 Improved the KiwixButton to allow the caller to modify its width and background color, making it reusable in various scenarios. The base implementation remains the same, following our theme. In ZimHostFragment, the button color is dynamically changed based on the server's active or stopped state. 2025-03-12 17:59:03 +05:30
MohitMaliFtechiz
8e09ec66ea Added support for loading ImageBitmap in our IconItem class, allowing us to load any type of image wherever needed.
* Created an extension function (`toPainter()``) to encapsulate the logic, preventing code duplication. Now, we can directly call this function, and it will load the image based on the provided type.
2025-03-12 17:56:06 +05:30
MohitMaliFtechiz
817ec20ad9 Created ZimHostScreen compose screen.
* Created BookItem, and LanguageHeader compose screens which we are showing on the ZimHostScreen.
2025-03-12 17:51:22 +05:30
MohitMaliFtechiz
37681dcb52 Migrated the ZimHostFragment to compose.
* Minor improvements in previous code for better readability.
2025-03-12 17:45:02 +05:30
Kelson
d4ebe42d49
Merge pull request #4258 from kiwix/Fixes#4250
Migrated the `AddNoteDialog` to jetpack.
2025-03-12 05:53:06 +01:00
MohitMaliFtechiz
b309032241 Fixed: testNoteEntryIsRemovedFromDatabaseWhenDeletedInAddNoteDialog failing on API level 25. 2025-03-11 19:21:22 +05:30
MohitMaliFtechiz
df67f91b0a Removed the unused code from project, and improve the cursor position when opening the saved notes. 2025-03-11 16:30:40 +05:30
MohitMaliFtechiz
0ed106cf81 Added KiwixDialogTheme to ensure consistent dialog styling with the app's light and dark themes. 2025-03-11 15:31:01 +05:30
MohitMaliFtechiz
e153bfc38a Improved the toolbar's title in night theme according to our theme. 2025-03-11 14:57:32 +05:30
MohitMaliFtechiz
f918fe4eff Fixed: Prevented false note edits when clicking at the end of a saved note, as onTextChange was triggered due to cursor movement rather than actual text changes. 2025-03-11 14:08:41 +05:30
MohitMaliFtechiz
58b32b5350 Fixed: The NoteFragmentTest was failing.
* Improved the setting of text in noteTextField for better maintainability.
2025-03-11 12:44:40 +05:30
MohitMaliFtechiz
4444a6f236 Refactored the NoteFragmentTest to test with compose UI.
* Added testing tags to our compose UI components which help us to test the compose UI.
2025-03-10 18:35:28 +05:30
MohitMaliFtechiz
3162d38ff9 Corrected the actionButton color of snackbar according the light/dark theme. 2025-03-10 18:35:28 +05:30
MohitMaliFtechiz
f24e28ed45 Improved the SnackbarHostStateExtension for better reusability. 2025-03-10 18:35:28 +05:30
MohitMaliFtechiz
bf4ff3c22f Added AddNoteDialogScreen and created a snackBarHostState extension to show the Snackbar on every screen.
* Removed unused code from the project.
* Refactored all `AddNoteDialog` code to use the Compose screen.
* Implemented a way to dynamically enable/disable menu items as needed, such as on the AddNoteDialog screen.
* Some code improvements.
2025-03-10 18:35:28 +05:30
MohitMaliFtechiz
adc4d8eaf3 Implemented reusable Compose-based KiwixAppBar (Toolbar) for all screens, allowing each fragment to customize its UI. Added optional search bar support for fragments that require it. 2025-03-10 18:35:28 +05:30
MohitMaliFtechiz
60a9f7a3b8 Using colors from our compose Color file instead of XML-based color file since the XML-based file will be removed in future. 2025-03-10 18:35:28 +05:30
Kelson
d3f8c254e2
Merge pull request #4261 from kiwix/refactored_zim_file_rendering_test
Refactored the `ZimFileRendering` test to align with the new ZIM file, as the content of the `mainPage` in `wikipedia_fr_climate_change_mini` has changed.
2025-03-10 12:48:40 +01:00
MohitMaliFtechiz
5dfb9ed6b5 Refactored the ZimFileRendering test to align with the new ZIM file, as the content of the mainPage in wikipedia_fr_climate_change_mini has changed. 2025-03-10 14:37:38 +05:30
Kelson
6a8fa05750
Merge pull request #4253 from kiwix/Fixes#4249
Migrated the `ErrorActivity` to jetpack.
2025-03-07 23:04:42 +01:00
MohitMaliFtechiz
1a166d70f5 Fixed: The ErrorActivityTest. 2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
48796ae67e Improved the folder structure for compose.
* Renamed `ComposeButton` to `KiwixButton` for consistency and to align with the app theme.
2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
5ea7e86277 Refined the Compose dependencies.
* Refactored the dependencies to be included only in the modules where they are required.
* Removed unnecessary dependencies from the project.
2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
1743d7b231 Added ErrorActivity UI test case for testing the compose UI.
* Removed the unused code from project.
2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
cca03cc06e Refactored the ErrorActivity to support edgeToEdge feature introduced in Android 15. 2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
6fb8620057 Refined the checkbox text to use style from MaterialTheme.
* Refined the `ComposeButton` according to our theme.
2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
ea089e09f2 Minor fixes in UI of ErrorActivity.
* Fixed ktlint issue.
2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
fb4dec2b51 Created the Typography file to manage the Material design guidelines for our textView 2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
000f9bfe1d Created KiwixTheme for compose so that we use it everywhere. 2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
fd47586e40 Created ComposeDimens to Centralize dimensions and avoiding harcoding the values everwhere in code for better maintainability and consistency 2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
307b6b080c Created ErrorActivityScreen.kt class for handing the compose UI separately to maintain the separate concern. 2025-03-07 23:04:07 +01:00
MohitMaliFtechiz
55bcccce8c Migrating the ErrorActivity in jetpack.
* Added the jetpack compose libraries in project.
2025-03-07 23:04:07 +01:00
Kelson
79f24b0b61
Merge pull request #4257 from kiwix/Fixes#4256
Migrated the deprecated `detekt` rules to new rules.
2025-03-07 22:58:07 +01:00
MohitMaliFtechiz
c5cc0cdd4c Migrated the deprecated detekt rules to new rules.
* Refactored the code according to the new rules of detekt.
2025-03-07 22:57:34 +01:00
Kelson
f96ab4d44d
Merge pull request #4229 from kiwix/translatewiki
Localisation updates from https://translatewiki.net.
2025-03-06 13:28:55 +01:00
translatewiki.net
b36e96e2ab
Localisation updates from https://translatewiki.net. 2025-03-06 13:05:53 +01:00
Kelson
e1b960dcdd
Merge pull request #4255 from kiwix/Fixes#4234
Fixed: Transparent images were not visible in "Dark mode".
2025-03-04 18:24:32 +01:00