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

Ensure same padding around text in pagination #678

Open
bjarnef opened this issue Nov 30, 2023 · 2 comments
Open

Ensure same padding around text in pagination #678

bjarnef opened this issue Nov 30, 2023 · 2 comments
Labels
bug Something isn't working needs triage This issue has not been tested by a team member yet

Comments

@bjarnef
Copy link
Contributor

bjarnef commented Nov 30, 2023

Which exact UI Library version are you using? For example: 1.0.1 - don't just write v1.

1.4.0

Bug summary

I played with <uui-table> and <uui-pagination> in a dashboard in Umbraco 12.3.3 combined with Angular.

However it seems the "Previous" doesn't get much padding compared to the others due a minimum width.

image

I think the minimum width it not needed or eventually just be e.g. 40px.

It seems to work better changing these:

--uui-button-padding-left-factor: 1;
--uui-button-padding-right-factor: 1;

to

--uui-button-padding-left-factor: 2;
--uui-button-padding-right-factor: 2;

it does look a bit nicer here though.
https://uui.umbraco.com/?path=/docs/uui-pagination--docs

however without the minimum width the buttons has same visually spacing around the text:

image

Specifics

No response

Steps to reproduce

Add <uui-pagination> component and notice spacing around button text.

Expected result / actual result

No response

@bjarnef bjarnef added bug Something isn't working needs triage This issue has not been tested by a team member yet labels Nov 30, 2023
@bjarnef
Copy link
Contributor Author

bjarnef commented Nov 30, 2023

Odd now it render the pagination like this evet current page is 1.

image

image

it seems it is because of the Angular binding. If I use a static value it works, e.g `current="1".

I think also it would be great to document the change or show an example in the code:
https://uui.umbraco.com/?path=/docs/uui-pagination--docs

I have this in Angular though:

<uui-pagination
    class="pagination"
    current="{{vm.pagination.pageNumber}}"
    total="{{vm.pagination.totalPages}}"
    ng-on-change="vm.onChange($event)">
</uui-pagination>
function onChange(event) {
    vm.pagination.pageNumber = event.currentTarget._current;
    vm.doFilter();
}

@bjarnef
Copy link
Contributor Author

bjarnef commented Nov 30, 2023

I think it need ng-attr- prefix for current and total property property.

<uui-pagination
    class="pagination"
    ng-attr-current="{{vm.pagination.pageNumber}}"
    ng-attr-total="{{vm.pagination.totalPages}}"
    ng-on-change="vm.onChange($event)">
</uui-pagination>

I tried with ng- og ng-bind- which most worked on "current", but for "total" it rendered 100 pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage This issue has not been tested by a team member yet
Projects
None yet
Development

No branches or pull requests

1 participant