-
Notifications
You must be signed in to change notification settings - Fork 133
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
Add horizontal spacing between the icon and text in the custom icon list #2352 #2375
Add horizontal spacing between the icon and text in the custom icon list #2352 #2375
Conversation
- Allow users to modify icon's size, width, height, and class for customizing icon attributes while also providing the option to adjust spacing between the icon and text for enhanced user experience. - Add "i-spacing" attribute to ICON_ATTRIBUTES and interface IconAttributes in CustomListIconProcessor.ts. - Implement logic to check whether the user has defined the i-spacing attribute or not. - Update createIconSpan function to incorporate i-spacing attribute. - Update getIconAttributes function to retrieve i-spacing attribute. - This consolidation of attributes maintains code consistency and cleanliness. - Refer issues: MarkBind#2352, MarkBind#2316.
feel free to leave some feedback:) happy to review and improve it |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2375 +/- ##
==========================================
- Coverage 48.92% 48.90% -0.02%
==========================================
Files 124 124
Lines 5245 5247 +2
Branches 1110 1112 +2
==========================================
Hits 2566 2566
- Misses 2371 2373 +2
Partials 308 308 ☔ View full report in Codecov by Sentry. |
Hi @Ashleeey1224, sorry for the late response. Please wait for the discussion in the original issue to conclude before making further changes. |
I will close this for now as a conclusion is not yet reached in the original issue. Please feel free to re-open after the investigation/discussion is completed. |
…hleeey1224/MarkBind#2352-i-spacing-feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM.
I think just 1 small nit and also the potential repositioning of a part of the docs!
@yucheng11122017 is this PR still linked to #2352? Need to update the description to target it properly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@all-contributors please add @Ashleeey1224 for code |
I've put up a pull request to add @Ashleeey1224! 🎉 |
What is the purpose of this pull request?
Resolves #2352
This PR resolves issue #2352 by adding i-spacing attribute for modifying horizontal spacing between the icon and text in the custom icon list.
Overview of changes:
* **Item 1**: i-spacing is 0.15em {icon="glyphicon-education" i-width="70px" i-spacing="0.15em"}
* **Item 2**: i-spacing is 0.55em{i-width="70px" i-spacing="0.55em"}
* Item 2.1: no i-spacing attribute, default is 0.35em {icon="fas-question-circle"}
* Item 2.2:
* Item 2.3: overwrite i-spacing attribute by 2em {i-spacing="2em"}
* **Item 3**{i-width="70px"}
* Item 3.1: {icon="glyphicon-book" i-width="70px"}
* Item 3.2: {icon="/images/AzurLane_roma copy.png" i-size="10px" i-class="rounded"}
Anything you'd like to highlight/discuss:
Once a i-spacing attribute is assigned to an icon, it will continue apply to icons at the same level (e.g., Item2.3, Item3.1, Item3.2), until it is overridden by a different i-spacing attribute (e.g., from Item 2.1 to Item 2.3).
Testing instructions:
Proposed commit message: (wrap lines at 72 characters)
Add i-spacing attribute to custom icon list
Providing an option to adjust spacing between the icon and text for enhanced user experience.
Add "i-spacing" attribute to ICON_ATTRIBUTES and interface IconAttributes
Implement logic to check whether the user has defined the i-spacing attribute or not.
Update createIconSpan function to incorporate i-spacing attribute.
Update getIconAttributes function to retrieve i-spacing attribute.
Changes maintains code consistency and cleanliness.
Refer issues: Add horizontal spacing between the icon and text in the custom icon list #2352, Add Icon and Media Support to List - Resolves #906 and #2272 #2316.
Checklist: ☑️