Problem/Motivation

I want to see what this module can do to quickly evaluate it for my needs.

Proposed resolution

Provide a demo module that showcases the features.

Sample:
Office Hours demo screenshot sample

Remaining tasks

Review and merge.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mortona2k created an issue. See original summary.

mortona2k’s picture

Status: Active » Needs review
mortona2k’s picture

I included a demo for #3630718: No day label for 'Show only current day' and 'Group consecutive days'.

The tests for this will fail until it's merged, but you can see what the issue is.

mortona2k’s picture

  • johnv committed 2443ff37 on 8.x-1.x
    Issue #3630716: Add Office Hours example module
    
johnv’s picture

Title: Office Hours demo module » Office Hours example module
Version: 8.x-1.x-dev » 8.x-1.29

Nice. Very nice. Committed.
I added it to the 'Example modules' section, and renamed everything from demo to example.

It also shows that some formatters are incorrect , I guess when the formatter for a give site is displayed multiple times per page.
Especially the
- 'Open now' status formatter
- office-hours-status--closed ccs

But that might also be a problem with the imlementation of public function OfficeHoursExampleHooks::nodeView()

  • johnv committed 8af77e07 on 8.x-1.x
    Issue #3630716: Add Office Hours example module
    
mortona2k’s picture

I think the issue comes from the code change in https://www.drupal.org/project/office_hours/issues/3630495#comment-16806632.

Added a new issue to fix: #3634431: Current status is wrong when the field is rendered more than once on a page.

I think we can close this one and follow up with any improvements in new tickets.

johnv’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • johnv committed c8f0b022 on 8.x-1.x
    Issue #3630716: Add Office Hours example module - cspell
    
mortona2k’s picture

FYI I added Office Hours to the booking/availability/registration comparison docs page: https://www.drupal.org/docs/extending-drupal/contributed-modules/compari...

johnv’s picture

Thanks, I added it to the project page.

johnv’s picture

Can you see why the uninstall gives a test error? https://git.drupalcode.org/project/office_hours/-/jobs/13322081

mortona2k’s picture

OfficeHoursExampleHooks::features() checks isExceptionHeader($day) where the issue branch had isExceptionDay($day).

  • johnv committed 60ee1e24 on 8.x-1.x
    Issue #3630716: Offcice Hours Example: fix OfficeHoursExampleHooks::...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.