Skip to content

Conversation

@A-Wheeto
Copy link
Contributor

@A-Wheeto A-Wheeto commented Mar 7, 2025

Status

Review progress:

  • Browser tested
  • Front-end review completed
  • Tech review completed

What's changed?

  • Added options for background colour and I belong flag to page title component
  • Updated page title mock
  • Added graphql query test for page title

Steps to perform after deploying to production

If the production environment requires any extra work after this PR has been deployed detail it here. This could be running a Rake task, migrating a DB table, or upgrading a Gem. That kind of thing.

@tc-deploybot tc-deploybot temporarily deployed to teachcomputing-pr-2332 March 7, 2025 11:19 Inactive
Copy link
Contributor

@msquance-stem msquance-stem left a comment

Choose a reason for hiding this comment

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

Looks good, but I think we should bring the styles controlling the flag into the component, as it will be easier to find in the future, and then you don't have to worry about something external to the component changing it

<%= render Cms::ImageComponent.new(@title_image, show_caption: false) %>
</div>
<% elsif @i_belong_flag %>
<div class="page-title__media i-belong-hero__area--logo">
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we change these classes to reflect the component, and then replicate the scss code into here, rather than relying on the global styles, as I think we should move away from them.

@A-Wheeto A-Wheeto temporarily deployed to teachcomputing-pr-2332 March 10, 2025 08:25 Inactive
@i_belong_flag = i_belong_flag
end

def background_color_class
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I realised we weren't setting a default background colour, existing pages using the component wouldn't have a background colour class. This method sets it to the default lime green.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you just change the component definition to have "lime-green" as the default for the background color param? Saves you needing the method

Copy link
Contributor

@msquance-stem msquance-stem left a comment

Choose a reason for hiding this comment

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

LGTM, one suggestion that would simplify your default colour

@i_belong_flag = i_belong_flag
end

def background_color_class
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you just change the component definition to have "lime-green" as the default for the background color param? Saves you needing the method

@A-Wheeto A-Wheeto temporarily deployed to teachcomputing-pr-2332 March 10, 2025 10:37 Inactive
@msquance-stem msquance-stem force-pushed the 2995-strapi-component-update---page-title branch from 8a40b4d to 106376f Compare March 18, 2025 12:04
@sonarqubecloud
Copy link

@tc-deploybot tc-deploybot temporarily deployed to teachcomputing-pr-2332 March 18, 2025 12:19 Inactive
@msquance-stem msquance-stem merged commit f1cf519 into main Mar 18, 2025
8 checks passed
@msquance-stem msquance-stem deleted the 2995-strapi-component-update---page-title branch March 18, 2025 13:19
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.

4 participants