Skip to content

feat(Authoring): Add global show activity title and icon settings - #2340

Merged
breity merged 2 commits into
style/separate-activity-layoutfrom
add-global-activity-title-and-icon-authoring
Sep 10, 2026
Merged

feat(Authoring): Add global show activity title and icon settings#2340
breity merged 2 commits into
style/separate-activity-layoutfrom
add-global-activity-title-and-icon-authoring

Conversation

@breity

@breity breity commented Sep 9, 2026

Copy link
Copy Markdown
Member

Changes

  • Adds authoring options to globally show/hide activity titles and activity type icons in the VLE student view for a unit.
  • Show titles must be set to true for the show icons toggle to be visible in the authoring tool.
  • Show titles and show icons must be set to true for icons to be shown to students.
  • Hide Activity Title authoring field for activities when show titles is set to false.

Test

  • Open the authoring tool for a unit, navigate to the Unit Info page, select the Theme tab.
  • Verify that "Show activity titles" and "Show activity type icons" are set to true (on) by default.
  • Go to author view for some steps and select activities to open their authoring mode. Add some activity titles.
  • Go back Unit Info -> Theme tab and toggle activity titles off (false).
  • Preview the unit and ensure that activity titles and icons do not show for students.
  • Go to author view for some steps and select activities to open their authoring mode. Ensure that the Activity Title authoring field is not shown.
  • Go back to the authoring tool and update the activity title and icon settings (in Unit Info -> Theme) to different values.
  • In preview, ensure that:
    • Activity titles appear for students when "Show activity titles" is set to true.
    • Activity icons appear for students when "Show activity titles" and "Show activity type icons" are both set to true.
    • Activity titles appear but icons do not when "Show activity titles" is set to true and "Show activity type icons" is set to false.

@breity breity self-assigned this Sep 9, 2026
@breity breity added the enhancement New feature of any size or improvement (UI, performance, security) label Sep 9, 2026

@hirokiterashima hirokiterashima left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

Should we simplify the phrasing "Show activity type icons" => "Show activity icons"? Not sure if "type" is useful for authors here.

I added minor code improvement suggestions inline also.

}

protected get showTitle(): boolean {
return Boolean(this.title && this.themeSettings?.showComponentTitles);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we need to wrap the boolean evaluation with Boolean()?

Suggested change
return Boolean(this.title && this.themeSettings?.showComponentTitles);
return this.title && this.themeSettings?.showComponentTitles;

}

protected get showIcon(): boolean {
return Boolean(this.showTitle && this.themeSettings?.showComponentTypeIcons);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we need to wrap the boolean evaluation with Boolean()?

Suggested change
return Boolean(this.showTitle && this.themeSettings?.showComponentTypeIcons);
return this.showTitle && this.themeSettings?.showComponentTypeIcons;

metadataChanged: Subject<void> = new Subject<void>();
projectIcon: string = '';
projectIcons: any = [];
protected themeSettings: any;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Give type?

Suggested change
protected themeSettings: any;
protected themeSettings: ThemeSettings;

metadataChanged: Subject<void> = new Subject<void>();
projectIcon: string = '';
projectIcons: any = [];
protected themeSettings: any;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Give type?

Suggested change
protected themeSettings: any;
protected themeSettings: ThemeSettings;

@breity
breity merged commit fbcf1ee into style/separate-activity-layout Sep 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature of any size or improvement (UI, performance, security)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants