Skip to content

Feature/prayer times widget#787

Open
miraquel wants to merge 1 commit intoamnweb:mainfrom
miraquel:feature/prayer-times-widget
Open

Feature/prayer times widget#787
miraquel wants to merge 1 commit intoamnweb:mainfrom
miraquel:feature/prayer-times-widget

Conversation

@miraquel
Copy link
Copy Markdown

@miraquel miraquel commented Mar 14, 2026

This pull request introduces a new API data fetcher for Islamic prayer times and adds a comprehensive configuration model for the prayer times widget. The main changes are the addition of a robust Qt-based fetcher class to handle API requests and retries, and a detailed Pydantic-based configuration schema to customize widget behavior, appearance, and interactions.

API integration:

Added the PrayerTimesDataFetcher class in api.py to handle periodic fetching of prayer times from the Aladhan API, including error handling, retry logic, and signal emission for downstream processing.
Widget configuration:

Introduced PrayerTimesConfig and related Pydantic models in prayer_times.py to define widget settings such as location, calculation method, display format, icons, menu appearance, flash behavior, and callbacks, enabling extensive customization and validation.
Defined specialized configs for icons (PrayerTimesIconsConfig), menu (PrayerTimesMenuConfig), flash alerts (PrayerTimesFlashConfig), and callbacks (PrayerTimesCallbacksConfig), allowing granular control over each widget aspect.
These changes lay the groundwork for a reliable, highly configurable prayer times widget that supports robust data fetching and flexible user interface options.

yasb_bar_primary-bar_20260314_125742
yasb_bar_primary-bar_20260314_125742-crop
Screenshot 2026-03-14 125930

@TheGamer1445891
Copy link
Copy Markdown

saya 🫡

buatin untuk yang agama lain juga bang biar adil
@miraquel

@miraquel
Copy link
Copy Markdown
Author

Boleh bro, asal ada API nya, tapi mending di widget berbeda biar lebih rapih. khusus untuk widget ini ya islamic prayer times aja.

@TheGamer1445891
Copy link
Copy Markdown

for non indonesians:

me:
make one for other religion so its equal

miraquel:
Yes, bro, as long as there's an API, but it's better to use a separate widget for a neater look. This widget specifically uses Islamic prayer times.

@amnweb
Copy link
Copy Markdown
Owner

amnweb commented Mar 16, 2026

@miraquel thanks for the PR, can you please clean up the commit history? All this can be one commit.

@miraquel miraquel force-pushed the feature/prayer-times-widget branch 2 times, most recently from 94fe0cc to ad55402 Compare March 17, 2026 01:30
@miraquel
Copy link
Copy Markdown
Author

@amnweb Done. Thank you for the feedback

@amnweb
Copy link
Copy Markdown
Owner

amnweb commented Mar 17, 2026

@miraquel is this written by AI?

@miraquel
Copy link
Copy Markdown
Author

@amnweb Yes, it is. I'm using it right now and testing it extensively.

@amnweb
Copy link
Copy Markdown
Owner

amnweb commented Mar 17, 2026

Yeah, I see mixed English and Chinese/Japanese characters in the logs, that's why i ask.

- Implement Prayer Times widget with Aladhan API integration
- Support configurable city, country, calculation method, and school
- Display current and next prayer times with countdown timer
- Add flash animation for prayer time notifications with grace period
- Add retry mechanism for network failures
- Support tooltip with full daily prayer schedule
- Add popup menu with all prayer times for the day
- Add callback actions and menu configuration options
- Support debug option for flash configuration
- Include icon mapping for each prayer time
@miraquel miraquel force-pushed the feature/prayer-times-widget branch from ad55402 to 564ad0e Compare March 20, 2026 05:05
@amnweb
Copy link
Copy Markdown
Owner

amnweb commented Mar 24, 2026

I have tested this PR now. The example page should be written better, this is how it looks for me. Some icons are also missing
Screenshot 2026-03-24 010355

Also, for some reason this popup is slow, there is a delay when I click to open it. Another problem, can you make all of this without hardcoded element dimensions in the popup, so everything can be configured via CSS?

@TheGamer1445891
Copy link
Copy Markdown

I have tested this PR now. The example page should be written better, this is how it looks for me. Some icons are also missing Screenshot 2026-03-24 010355

Also, for some reason this popup is slow, there is a delay when I click to open it. Another problem, can you make all of this without hardcoded element dimensions in the popup, so everything can be configured via CSS?

i think he used some icons that are not from jetbrain nerd fonts.
also i think the popup appearing slow is because its processing the api first then after it completed, it will show the popup (like awqat salaat app (it shows the popup slow because its processing the api))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants