Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[59845] Update Datepicker for automatic scheduling mode #17349

Draft
wants to merge 28 commits into
base: feature/42388-new-automatic-scheduling-mode
Choose a base branch
from

Conversation

HDinger
Copy link
Contributor

@HDinger HDinger commented Dec 4, 2024

Ticket

https://community.openproject.org/projects/stream-planning-and-reporting/work_packages/59845/activity

What are you trying to accomplish?

Primerise the datepicker dialog

ToDo

  • Render a Primer Banner with different texts depending on the data
  • There is a new segmented control "Scheduling mode"
  • The inputs are Primer Text fields
    • There is a "today" link below
  • The dialog content (text fields) update automatically:
    • when the calendar is changed
    • when the text field values are changed manually
  • Handle special cases
    • Milestones
    • WorkPackage create form
    • mobile

Screenshots

Dec-18-2024 09-26-28

What approach did you choose and why?

Moving the datepicker dialog closer towards Primer. Two things will remain however in angular:

  • the modal itself, and
  • the flatpickr Instance.

The modal is so closely coupled to the edit field that it will be very hard to get rid of that. Flatpickr is an external library which will not get rid of for now.

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@HDinger HDinger added the feature label Dec 4, 2024
@HDinger HDinger added this to the 15.2.x milestone Dec 4, 2024
@HDinger HDinger force-pushed the feature/59845-update-datepicker-for-automatic-scheduling-mode branch 5 times, most recently from cc0f76c to 7bdd2e1 Compare December 6, 2024 12:45
@HDinger HDinger force-pushed the feature/59845-update-datepicker-for-automatic-scheduling-mode branch from d7bcc0a to 7f70319 Compare December 11, 2024 08:39
@HDinger HDinger force-pushed the feature/59845-update-datepicker-for-automatic-scheduling-mode branch from b7cba78 to ec6b2bd Compare December 16, 2024 12:04
Comment on lines 29 to 32
import {
ChangeDetectorRef,
Component,
ElementRef,
Inject,
Injector,
OnInit,
} from '@angular/core';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class

Unused imports ChangeDetectorRef, ElementRef, Inject, Injector.
import { DatePickerEditFieldComponent } from 'core-app/shared/components/fields/edit/field-types/date-picker-edit-field.component';
import { WorkPackageResource } from 'core-app/features/hal/resources/work-package-resource';
import { PathHelperService } from 'core-app/core/path-helper/path-helper.service';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class

Unused import PathHelperService.
import { DatePickerEditFieldComponent } from 'core-app/shared/components/fields/edit/field-types/date-picker-edit-field.component';
import { WorkPackageResource } from 'core-app/features/hal/resources/work-package-resource';
import { PathHelperService } from 'core-app/core/path-helper/path-helper.service';
import { I18nService } from 'core-app/core/i18n/i18n.service';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class

Unused import I18nService.
import { DatePickerEditFieldComponent } from 'core-app/shared/components/fields/edit/field-types/date-picker-edit-field.component';
import { WorkPackageResource } from 'core-app/features/hal/resources/work-package-resource';
import { PathHelperService } from 'core-app/core/path-helper/path-helper.service';
import { I18nService } from 'core-app/core/i18n/i18n.service';
import { ResourceChangeset } from 'core-app/shared/components/fields/changeset/resource-changeset';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class

Unused import ResourceChangeset.
import { PathHelperService } from 'core-app/core/path-helper/path-helper.service';
import { I18nService } from 'core-app/core/i18n/i18n.service';
import { ResourceChangeset } from 'core-app/shared/components/fields/changeset/resource-changeset';
import { HalResource } from 'core-app/features/hal/resources/hal-resource';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class

Unused import HalResource.
OpEditingPortalHandlerToken,
OpEditingPortalSchemaToken,
} from 'core-app/shared/components/fields/edit/edit-field.component';
import { ResourceChangeset } from 'core-app/shared/components/fields/changeset/resource-changeset';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class

Unused import ResourceChangeset.
OpEditingPortalSchemaToken,
} from 'core-app/shared/components/fields/edit/edit-field.component';
import { ResourceChangeset } from 'core-app/shared/components/fields/changeset/resource-changeset';
import { HalResource } from 'core-app/features/hal/resources/hal-resource';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class

Unused import HalResource.
} from 'core-app/shared/components/fields/edit/edit-field.component';
import { ResourceChangeset } from 'core-app/shared/components/fields/changeset/resource-changeset';
import { HalResource } from 'core-app/features/hal/resources/hal-resource';
import { IFieldSchema } from 'core-app/shared/components/fields/field.base';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class

Unused import IFieldSchema.
import { ResourceChangeset } from 'core-app/shared/components/fields/changeset/resource-changeset';
import { HalResource } from 'core-app/features/hal/resources/hal-resource';
import { IFieldSchema } from 'core-app/shared/components/fields/field.base';
import { EditFieldHandler } from 'core-app/shared/components/fields/edit/editing-portal/edit-field-handler';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class

Unused import EditFieldHandler.
import { HalResource } from 'core-app/features/hal/resources/hal-resource';
import { IFieldSchema } from 'core-app/shared/components/fields/field.base';
import { EditFieldHandler } from 'core-app/shared/components/fields/edit/editing-portal/edit-field-handler';
import { PathHelperService } from 'core-app/core/path-helper/path-helper.service';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class

Unused import PathHelperService.
@HDinger HDinger force-pushed the feature/59845-update-datepicker-for-automatic-scheduling-mode branch from 0a32707 to 9488170 Compare December 18, 2024 08:37
@HDinger HDinger changed the base branch from dev to feature/42388-new-automatic-scheduling-mode December 18, 2024 08:38
@HDinger HDinger removed this from the 15.2.x milestone Dec 18, 2024
@HDinger HDinger added this to the 15.3.x milestone Dec 20, 2024
@cbliard cbliard force-pushed the feature/42388-new-automatic-scheduling-mode branch 2 times, most recently from e256a4f to a90fb94 Compare January 7, 2025 16:32
@HDinger HDinger force-pushed the feature/59845-update-datepicker-for-automatic-scheduling-mode branch from 0943a3b to a7052ac Compare January 10, 2025 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

1 participant