Skip to content

Widget improvements: Fixed height option, scrollable, auto-sync when new appointments are received, show per-calendar, height re-adjusts after (auto)refreshing.- #735 - #736

Open
XeroxQ wants to merge 21 commits into
runely:masterfrom
XeroxQ:master
Open

XeroxQ wants to merge 21 commits into
runely:masterfrom
XeroxQ:master

Conversation

@XeroxQ

@XeroxQ XeroxQ commented Sep 30, 2026

Copy link
Copy Markdown

No description provided.

@runely runely left a comment •

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still there's things to fix here.. Would have been better if you just opened an issue and explained what you wanted..

npm run test are still showing a warning.. That is a no go!

The Scrollable part you have mentioned in the changelogs does not work, and will not work because Homey intercepts the scroll touch events.. Remove everything that you have added for this part.

Comment thread handlers/setup-actions.ts Outdated
Comment on lines +36 to +38
if (getEventsFinished.length === 0) {
app.broadcastCalendarUpdate();
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, there's no need to have this call in an if. At this point, we alreay know that getEventsFinished is 0

Comment thread widgets/next-events/public/index.html Outdated
display: inline-block;
min-height: 0;
overflow: hidden;
overflow-y:auto;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Space between property and value

Comment thread widgets/next-events/public/index.html Outdated

.cal-footer {
position: fixed;
bottom:var(--homey-su-2);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Space between property and value

Comment thread widgets/next-events/public/index.html Outdated
}

function resizeToContent() {
if(useFixedHeight) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Space between if and parantheses

Comment thread widgets/next-events/api.mts Outdated
if (calendars.length === 0) {
return [];
}
if(calendarToShow && calendarToShow!=='__all__') {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Space between if and parantheses

Comment thread app.ts
Comment on lines +77 to +81
async (query: string, _settings): Promise<Widget.SettingAutocompleteResults> => {
const results = [{ id: "__all__", name: this.homey.__("calendar.all") }] as any;
results.push(...this.getCalendars().filter(item => item.name.toLowerCase().includes(query.toLowerCase())));
return results;
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are sending back way too much in results.. this.getCalendars() returns an array of calendars with their name and all of their events..

Also, don't use any. It defeats the purpose of using TypeScript!

Comment thread package-lock.json Outdated
Comment on lines +703 to +712
"version": "3.7.6",
"resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.7.6.tgz",
"integrity": "sha512-6KSjliQAXK8ZLgFQO4B7iE4Rpf/B3rItzCFuXezBY/XIAGxOdLd7vRNK9/StRPwiS/yJsVbB7HKpW46B8tcEuQ==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/node": {
"version": "26.6.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.2.tgz",
"integrity": "sha512-X1P21scMv4zGKLYqjdGjaKa7COa0RKVYYZZN/NfvLQ1JegxFhdhpZG/Lyn8AXx6CDUavKAd11v6BvfpkDByK8g==",
"version": "26.6.3",
"resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.3.tgz",
"integrity": "sha512-dsqMQQoeTLqu9wynDD00q573mNzso3IdQOAfHRJqLCcmCFPoGo9A1bDpUcv/9tnKpErQWv9uKeGfl37EIS02Yg==",

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't do this!! Dependency updates on dev packages is not done like this!! Revert this file!!

Comment thread package-lock.json Outdated
Comment on lines +1181 to +1183
"version": "2.2.7",
"resolved": "https://registry.npmjs.org/rrule-temporal/-/rrule-temporal-2.2.7.tgz",
"integrity": "sha512-sd4ee2vAeb5VtGfQSVg9KWc522cHRIz2O2waSiwgRXMYeAu3LFl1qzNqR0RkoqwKWH2bKYKN8WMFdDE+ffuwPQ==",

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't do this!! Dependency updates on dev packages is not done like this!! Revert this file!!

@XeroxQ XeroxQ left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed all requested changes

@runely

runely commented Oct 6, 2026

Copy link
Copy Markdown
Owner

The scrollable feature is not working as expected.

I've tested your changes by setting scrollable to true and max height to 400.

Sure, you can scroll some, but it's inconsistent. Probably because Homey captures the touch events. Sometimes i can scroll the full widget height, but mostly i can scroll 10-20px before it stops, even though my finger continues the swipe gesture. Tried with fixed height as both true and false, no difference.

Not sure what device you have tested this on, but i'm testing it on an Android.

Not going to implement this scrollbale feature until Athom fixes the widget scrolling. Sorry.

The Calendar to show feature is welcome though.

So please remove the scrollable feature from this PR. If you like you can open a different PR for the scrollable feature and i can come back to it if and when Athom fixes their widget scrolling.

@XeroxQ

XeroxQ commented Oct 6, 2026

Copy link
Copy Markdown
Author

Thanks, i have removed the scrollable option (and made a separate branch in which it is still included so it can potentionally be added later).

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.

2 participants