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

AppFrame component #1284

Merged
merged 17 commits into from
Apr 13, 2023
Merged

AppFrame component #1284

merged 17 commits into from
Apr 13, 2023

Conversation

didoo
Copy link
Contributor

@didoo didoo commented Mar 31, 2023

📌 Summary

This PR is a follow-up of https://github.com/hashicorp/ember-shared-components/pull/3 and is the first of the two components ported-back from Cloud UI (and ember-shared-components) to HDS (the other one is #1304).

For details about this decision, see the specific RFC: [DS-047] AppFrame / SideNav - From Cloud UI to HDS

🛠️ Detailed description

In this PR I have:

  • ported AppFrame code from the HcAppFrame implementation
    • converted from v2 to v1 addon format
    • I've re-organized the sub-components under the parts folder for simplicity, instead of having siblings
  • added a showcase for the AppFrame component (see preview below)
  • added the documentation to the Helios website for the AppFrame component (see preview below)
    • I've created a new group called "layouts" for this, that will contain other layout components in the future (eg. "stack/flexbox")

👉 👉 👉 Previews:

🔗 External links

Jira ticket: https://hashicorp.atlassian.net/browse/HDS-1749
Figma file: this is a layout-only component, no design associated to it


👀 Reviewer's checklist:

  • +1 Percy if applicable
  • Confirm that PR has a changelog update via Changesets if needed

💬 Please consider using conventional comments when reviewing this PR.

@didoo didoo requested review from meirish, alex-ju and a team March 31, 2023 10:33
@vercel
Copy link

vercel bot commented Mar 31, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
hds-showcase ✅ Ready (Inspect) Visit Preview Apr 13, 2023 2:50pm
hds-website ✅ Ready (Inspect) Visit Preview Apr 13, 2023 2:50pm

@meirish
Copy link
Contributor

meirish commented Mar 31, 2023

  • converted from v2 to v1 addon format

Just wanted to clarify - strict mode is an existing feature of ember's template layer and is the approved future syntax for templates in ember. V2 refers to a new addon layout that's spec'd here: emberjs/rfcs#507.

// FRAME'S CONTAINERS

.hds-app-frame__header {
z-index: 7;
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious, why the use of z-index?

One of the things we want to make sure does not happen is that interactive elements could be accidentally hidden behind "sticky" headers or footers.

Some reading:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We're reproducing (with different values) what already happens in production. We need to define a hierarchy of z-index for the top-level content (they will be converted to design tokens in a follow-up task)

Copy link
Member

Choose a reason for hiding this comment

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

With the current design/implementation, these z-index values have no effect as all containers have a static position. If one of them changes however (via an override, for example, or a script), having these z-index values can be a good fallback to make sure they overlap as expected.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In any case, there will be a follow-up PR for handling the z-index values in a more systematic way (exposing them as design tokens)

@MelSumner
Copy link
Contributor

FWIW, I think it's a step backward to go to a v1 addon from a v2 addon. I don't really understand why you'd choose to do this when there is a lot of effort being put into getting addons from v1 to v2. Strongly encourage a re-think on this.

Copy link
Contributor

@heatherlarsen heatherlarsen left a comment

Choose a reason for hiding this comment

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

Found a few nitpicky content things, but otherwise, this looks good! :shipit:

Co-authored-by: Heather Larsen <hlarsen@hashicorp.com>
Copy link
Member

@alex-ju alex-ju 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! Don't forget the changelog entry

website/app/templates/components.hbs Show resolved Hide resolved
// FRAME'S CONTAINERS

.hds-app-frame__header {
z-index: 7;
Copy link
Member

Choose a reason for hiding this comment

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

With the current design/implementation, these z-index values have no effect as all containers have a static position. If one of them changes however (via an override, for example, or a script), having these z-index values can be a good fallback to make sure they overlap as expected.

@didoo didoo force-pushed the app-frame-component branch from e18f593 to 56ebc72 Compare April 13, 2023 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants