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

[calcite-loader] Customization of text margin and style #6695

Closed
Tracked by #7180
jasdelreyes opened this issue Mar 28, 2023 · 5 comments
Closed
Tracked by #7180

[calcite-loader] Customization of text margin and style #6695

jasdelreyes opened this issue Mar 28, 2023 · 5 comments
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Online Issues logged by ArcGIS Online team members. c-loader Issues that pertain to the calcite-loader component design-tokens Issues requiring design tokens. enhancement Issues tied to a new feature or request. estimate - 2 Small fix or update, may require updates to tests. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - low Issue is non core or affecting less that 10% of people using the library

Comments

@jasdelreyes
Copy link

Description

Ability to customize the spacing of the text from the loader and loading text and the style of text (i.e. make bold). Currently, if there is long text used as the loading text, the text appears too close to the loader.

Acceptance Criteria

Prop to style the text
Prop to change the margin between text and loader (currently, the default margin of the loader from any other HTML elements is quite large, so adding a text div separately to customize text is unfeasible).

Relevant Info

No response

Which Component

calcite-loader

Example Use Case

No response

Priority impact

p2 - want for current milestone

Esri team

ArcGIS Online

@jasdelreyes jasdelreyes added 0 - new New issues that need assignment. enhancement Issues tied to a new feature or request. needs triage Planning workflow - pending design/dev review. labels Mar 28, 2023
@github-actions github-actions bot added ArcGIS Online Issues logged by ArcGIS Online team members. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone labels Mar 28, 2023
@geospatialem
Copy link
Member

@jasdelreyes Thanks for filing!

There may be some customization/workaround while we consider and prioritize the effort using some of loader's styles.

For instance: https://codepen.io/geospatialem/pen/oNPOgKO, where you can change the font-weight of the text prop:

calcite-loader {
  font-weight: var(--calcite-font-weight-bold);
}

Perhaps even if you did want to try adding in separate text to achieve a specific font-size, could use the --calcite-loader-padding set to 0 to remove padding:

<calcite-loader label="Adjusting polygons..."></calcite-loader>
<div id="loader-text">Adjusting polygons...</div>
calcite-loader {
  --calcite-loader-padding: 0;
}

#loader-text {
  font-size: var(--calcite-font-size-3);
  font-weight: var(--calcite-font-weight-bold);
  text-align: center;
  margin: 2rem 0rem;
}

@macandcheese
Copy link
Contributor

Related: #4470

@macandcheese macandcheese added the c-loader Issues that pertain to the calcite-loader component label Mar 28, 2023
@geospatialem geospatialem added the design-tokens Issues requiring design tokens. label Apr 2, 2024
@alisonailea
Copy link
Contributor

alisonailea commented Apr 4, 2024

requires creating a --calcite-loader-text-space and --calcite-loader-text-weight variables.
This should be pretty easy.

@alisonailea alisonailea added the estimate - 2 Small fix or update, may require updates to tests. label Apr 4, 2024
@geospatialem geospatialem added p - low Issue is non core or affecting less that 10% of people using the library needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. and removed needs triage Planning workflow - pending design/dev review. labels Apr 30, 2024
@DitwanP DitwanP self-assigned this Dec 4, 2024
@DitwanP DitwanP added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. labels Dec 4, 2024
@DitwanP DitwanP added this to the 2024-12-17 - Dec Milestone milestone Dec 4, 2024
@DitwanP DitwanP added 2 - in development Issues that are actively being worked on. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Dec 6, 2024
DitwanP added a commit that referenced this issue Dec 12, 2024
**Related Issue:** #7180 #6695

## Summary
Add design tokens for loader component along with e2e tests.

New tokens added:
`--calcite-loader-progress-color-inline`: Specifies the width and height
of the component when set to inline.
`--calcite-loader-text-spacing`: Specifies the component's text margin.
`--calcite-loader-text-weight`: Specifies the component's font weight.
`--calcite-loader-color`: Specifies the component's text color.
`--calcite-loader-progress-color`: Specifies the component's progress
ring color.
`--calcite-loader-track-color`: Specifies the component's track color.

Renamed tokens:
`--calcite-loader-padding` --> `--calcite-loader-spacing`

⚠️ Deprecated tokens:
`--calcite-loader-size-inline`
@DitwanP DitwanP added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels Dec 12, 2024
Copy link
Contributor

Installed and assigned for verification.

@DitwanP
Copy link
Contributor

DitwanP commented Dec 12, 2024

Verified
Screenshot 2024-05-21 at 11 06 30 AM

@DitwanP DitwanP closed this as completed Dec 12, 2024
@DitwanP DitwanP added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Online Issues logged by ArcGIS Online team members. c-loader Issues that pertain to the calcite-loader component design-tokens Issues requiring design tokens. enhancement Issues tied to a new feature or request. estimate - 2 Small fix or update, may require updates to tests. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - low Issue is non core or affecting less that 10% of people using the library
Projects
None yet
Development

No branches or pull requests

5 participants