Skip to content

[FIX] issues #36,#37,#38 &39#40

Open
KKamaa wants to merge 4 commits into
masterfrom
12537-update-chrome-firefox-fix
Open

[FIX] issues #36,#37,#38 &39#40
KKamaa wants to merge 4 commits into
masterfrom
12537-update-chrome-firefox-fix

Conversation

@KKamaa
Copy link
Copy Markdown
Contributor

@KKamaa KKamaa commented Apr 23, 2026

Fixing issues #36 #37 #38 #39

@KKamaa KKamaa self-assigned this Apr 23, 2026
@KKamaa KKamaa added Needs Review A code review is required WIP labels Apr 23, 2026
@KKamaa KKamaa force-pushed the 12537-update-chrome-firefox-fix branch from f66dcd3 to cc1fbc3 Compare April 23, 2026 03:27
@gjotten gjotten self-requested a review April 23, 2026 11:09
Copy link
Copy Markdown
Contributor

@gjotten gjotten left a comment

Choose a reason for hiding this comment

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

LGTM functionally in Chrome

@gjotten gjotten requested a review from thomaspaulb April 23, 2026 11:09
Copy link
Copy Markdown

@gfcapalbo gfcapalbo left a comment

Choose a reason for hiding this comment

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

nothing blocking, That's why i don't request changes.

  • some naming could be more descriptive of what it does
  • silent alert if alert function not fully loaded
  • some more error management
  • a url-db encoding would be better with a separator.

* Download a CSV with current month timesheet rows.
*/
async downloadCurrentMonthTimesheets() {
const autoDownloadEnabled = await storage.get('auto_download_issue_timesheet', false);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A bit confusing. the function is downloadCurrentMonthTimesheets
returns early if auto_download_issue_timesheet is false

If auto_download_issue_timesheet should be called allow_download_issue_timesheet? there is nothing "auto" about it , its just allow/dissallow download.

* Download a CSV for the currently timed item and current month.
*/
async downloadCurrentIssueTimesheet(issue) {
const today = new Date();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I would add a tyr catch here to like you did in downloadCurrentMonthTimesheets to notify network errors or any other thing gone wrong.


const customAlert = globalThis.alert && typeof globalThis.alert.show === 'function'
? globalThis.alert
: null;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

why? is alert not guaranteed to be present? it seems like there is a lot of defensive code, because we are not guaranteed globalThis.show fully loaded, wich is fine but
if it is not perhaps instead of null put in a minimal function with a basic message?

<input
id="auto_download_timesheet_input"
type="checkbox"
t-att-checked="state.autoDownloadIssueTimesheet"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

As i wrote above, "auto" doesn't look like the right name, should be "allow"

<t
t-foreach="state.remotes"
t-as="remote"
t-key="remote.url + remote.database"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Maybe my only gripe. no separator.
This could cause problems in dividing URL and DB, a separator would be better.
Would not cause problems in 99% of urls and DBS but would be better with a separator string.

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

Labels

Needs Review A code review is required WIP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants