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

Kuwait Theme: Settings page styling #2598

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

FaithDaka
Copy link
Collaborator

@FaithDaka FaithDaka commented Dec 4, 2024

PR Checklist

  • PR title descriptive (can be used in release notes)

Description

Includes styling for components on the Settings page. Button, Title

Author Notes

Use the button params: style: no-background to achieve the button look for the options list

Design Component
Screenshot 2024-12-24 at 12 04 00

Use the title component with params: variant: section_banner to achieve the text look for the options title

Design Component
Screenshot 2024-12-24 at 12 05 08

Use the title component with params: variant: page_banner to achieve the text look for the settings page title

Design Component
Screenshot 2024-12-24 at 12 05 34

Git Issues

Closes #2582

@FaithDaka FaithDaka linked an issue Dec 4, 2024 that may be closed by this pull request
4 tasks
@FaithDaka FaithDaka self-assigned this Dec 4, 2024
@FaithDaka FaithDaka added this to the ParentApp Kids KW Dec 2024 milestone Dec 4, 2024
@FaithDaka FaithDaka added the styling For styling PR label Dec 4, 2024
Copy link
Collaborator

@jfmcquade jfmcquade left a comment

Choose a reason for hiding this comment

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

We're trying to move away from setting styles via the style parameter – instead, named styles like list-title and page-title should be variants. This makes it easier to track what variant(/style) options are available for a given component, and also allows style to be used for applying global styles that make sense on multiple components (we haven't implemented this yet, but the plan is outlined in #1971 if you're interested 😅).

I would also suggest that page-title and list-title be variants of the dedicated title component (src/app/shared/components/template/components/title/title.component.ts), unless there is good reason to use the text component.

@FaithDaka
Copy link
Collaborator Author

Changes made @jfmcquade
Though I failed to understand how to use the title template for review. The title output is undefined

@esmeetewinkel esmeetewinkel removed their request for review December 13, 2024 15:11
Copy link
Collaborator

@jfmcquade jfmcquade left a comment

Choose a reason for hiding this comment

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

Thanks, @FaithDaka, I've added a few comments inline, plus some requests below:

For the button component, there are some issues with achieving your design by using the round button component inside a child row of the button component:

  • The spacing doesn't look quite right
  • The round button component is a different click target to its parent button

I think it would be better to pass in the secondary icon as an additional parameter to the button component, e.g. an icon_secondary param, and then pass this icon to the end slot of the ion-button inside src/app/shared/components/template/components/button/button.component.html, something like this:

Screenshot 2024-12-17 at 14 32 36

Changes made @jfmcquade Though I failed to understand how to use the title template for review.

You're right, it looks like the comp_title template wasn't fit for purpose. I've updated it now. You can add rows to demo the new variants included in this PR when you have finalised the names

Screenshot 2024-12-17 at 14 49 42

@@ -31,6 +31,8 @@ interface IButtonParams {
icon: string;
/** TEMPLATE PARAMETER: "image_asset". The path to an image asset */
image: string;
/** TEMPLATE PARAMETER: "icon_position". The alignment of the icon on the button */
iconPosition: "left" | "right";
Copy link
Collaborator

Choose a reason for hiding this comment

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

This param can be removed as I don't believe it's used

@@ -13,7 +13,7 @@ interface ITitleParams {
/** TEMPLATE PARAMETER: "style". */
style: string | null;
/** TEMPLATE PARAMETER: "variant". */
variant: "" | "header";
variant: "" | "header" | "list-title" | "page-title";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Now that these are variants of the title component itself, they should be renamed. I think the wording could be more descriptive/accurate/general as well, how about:

  • banner_page and banner_section
  • banner and banner_sub
    Or something along those lines

@FaithDaka
Copy link
Collaborator Author

Changes made @jfmcquade

Copy link
Collaborator

@jfmcquade jfmcquade left a comment

Choose a reason for hiding this comment

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

As outlined above, I don't think that using the round button inside the button component is a good solution. I've updated the button component to take a secondary icon instead, see a5f24f3, and updated the component demo template.

I will update the PR description accordingly and request a functional review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
styling For styling PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Kuwait Theme - Settings Page
2 participants