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

Datagrid: Add option to excel export to use the current locale #5663

Closed
NewCoffee1 opened this issue Sep 28, 2021 · 21 comments · Fixed by #5877
Closed

Datagrid: Add option to excel export to use the current locale #5663

NewCoffee1 opened this issue Sep 28, 2021 · 21 comments · Fixed by #5877
Assignees
Labels
team: appbuilder Issues for the App builder team type: enhancement ✨ [5] Velocity rating (Fibonacci)

Comments

@NewCoffee1
Copy link

NewCoffee1 commented Sep 28, 2021

Is your feature request related to a problem or use case? Please describe.
Hi IDS-Team,

While i'm working with the AppBuilder and the AppHub, i mentioned that the app doesn't take the locale from my browser (as every other application from the CloudSuite does). This is a bigger problem for the export function (to excel). Some formattings are not available (e.g. the Decimal separator (,) and 1000 separator (.) As usual in Germany) and have to be done after the excel export. When i set up different apps, i don't want the user to format the data after export.

Therefore i request you to improve your export functionality to take locale into consideration, so that after that the AppBuilder Team can implement a way for users to change the locale in app builder.
Right now the export function just takes the data from the grid with no formatting.

The best way would be that the application takes the locale from the browser or i can set it in the app configurations.
I explained the problem in ticket 15714463 on the Infor Concierge Portal.

Please work on this issue because it will increases the attractiveness of the app. Otherwise it becomes unusable in many cases.

Thanks

Describe the solution you'd like
Add an option so that the export to excel uses the current locale when exporting dates/numbers.

Describe alternatives you've considered
End user has to do it everytime which is a pain.

Additional context
AppBuilder and the AppHub

@tmcconechy tmcconechy added [5] Velocity rating (Fibonacci) team: appbuilder Issues for the App builder team type: enhancement ✨ labels Sep 28, 2021
@tmcconechy
Copy link
Member

tmcconechy commented Sep 28, 2021

When filing issues in the future please use the issue template https://github.com/infor-design/enterprise/issues/new/choose you could edit this issue to form into the markdown template for enhancements? But the question is clear.

We do not automatically take the browsers locale as not everyone wants this. But you can easily read the browser locale and call Soho.Locale.set(navigator.language).

I'm also not sure its a very good idea to change the export to use the locale. I would have to be convinced as this is a breaking change. And what we would be doing is formatting dates and numbers to strings. So it would make it difficult to use excel functions on the columns.

I suggest that you just use the excel features to format the numbers and dates.

Will keep this open for now tho for further discussion.

@NewCoffee1
Copy link
Author

Can i use Soho.Locale.set(navigator.language) i a MultiTenant environment?

It's not possible to format the numbers to a german format in the App. So it's necessary to format it in excel. I think this isn't the way we should work with an CloudSuite. The enduser has to format it every time he uses the export function.

@tmcconechy
Copy link
Member

I don't see why. The command just changed the Locale for the current browser instance. However as noted this isnt being used in the excel export.

We can add an option for that however, but the problem is that dates and numbers will become strings to excel so will make it more challenging to use its own formatting features. But if thats what we want it could be an option. Changed the tile of the issue.

@tmcconechy tmcconechy added this to Triage in Enterprise (Next) Sprint Grooming via automation Oct 14, 2021
@tmcconechy tmcconechy changed the title Change Locale in App Hub/ App Builder Datagrid: Add option to excel export to use the current locale Oct 14, 2021
@EdwardCoyle EdwardCoyle added this to To do in Enterprise 4.58.x (Nov 2021) Sprint via automation Oct 27, 2021
@EdwardCoyle
Copy link
Contributor

Needs further investigation to determine if Locale or the CSV export is the culprit

@tmcconechy
Copy link
Member

The problem is that it takes the unformatted data now. So would have to add an option that takes the data out of the table UI view instead.

@jbrcna
Copy link
Contributor

jbrcna commented Dec 2, 2021

this is now working as expected.
v4.59.0-dev
verified in https://main-enterprise.demo.design.infor.com/components/datagrid/example-export-format.html

I'd just like to clarify if this is the correct behavior.
observation 1: the Extra column 5th row doesn't have 'ية (مصر' when export as excel
image

observation 2: using de-DE locale, 2345 is formatted as '2.345'
image

observation 3: using ar-SA, 500 is aligned right. should be left?
(assumption: all numbers including 2345 is aligned left)
image

@nganotice
Copy link

I've also noticed that after picking any locale from the dropdown - the link lands on http://localhost:4000/components/datagrid/example-export-format.html?locale=en-US

Video 21

CC @tmcconechy @ericangeles

@ericangeles
Copy link
Contributor

It looks like the base URL sets statically. To fix this, you can use window.location.host to get the base URL of the page.

@tmcconechy
Copy link
Member

Also you can change the locale without reloading the page. I think you would just call

Locale.set()

And then rerender() on the datagrid?

Maybe thats better for a follow up fix?

@tmcconechy tmcconechy added this to To do in Enterprise 4.59.x (Dec 2021) Sprint via automation Dec 3, 2021
@ericangeles ericangeles moved this from To do to In progress in Enterprise 4.59.x (Dec 2021) Sprint Dec 6, 2021
@tmcconechy tmcconechy moved this from In progress to Ready for QA (beta) in Enterprise 4.59.x (Dec 2021) Sprint Dec 10, 2021
@ericangeles ericangeles moved this from Ready for QA (beta) to In progress in Enterprise 4.59.x (Dec 2021) Sprint Dec 13, 2021
@tmcconechy tmcconechy moved this from In progress to Ready for QA (beta) in Enterprise 4.59.x (Dec 2021) Sprint Dec 13, 2021
@jbrcna
Copy link
Contributor

jbrcna commented Dec 14, 2021

@jbrcna jbrcna moved this from Ready for QA (beta) to Failed QA (beta) in Enterprise 4.59.x (Dec 2021) Sprint Dec 14, 2021
@tmcconechy
Copy link
Member

This should be fixed on next deploy....

@jbrcna
Copy link
Contributor

jbrcna commented Dec 15, 2021

We'll do a retest again on this on next deploy. thanks @tmcconechy

@tmcconechy
Copy link
Member

Its there now https://main-enterprise.demo.design.infor.com/components/datagrid/example-export-format.html and seems working @jbrcna

@tmcconechy tmcconechy moved this from Failed QA (beta) to Ready for QA (beta) in Enterprise 4.59.x (Dec 2021) Sprint Dec 15, 2021
@jbrcna
Copy link
Contributor

jbrcna commented Dec 16, 2021

Thanks @tmcconechy . this is what I see on my end. I might be missing something. there's no error in console
Large GIF (1084x568)

the export functionality is working. however, there's a bit of a delay when changing locale using dropdown. Also the url/link is not changing. I assume that it should also change as well, but if it is by design, will mark this ticket Pass
image

image

@tmcconechy tmcconechy moved this from Ready for QA (beta) to Failed QA (beta) in Enterprise 4.59.x (Dec 2021) Sprint Dec 16, 2021
@tmcconechy
Copy link
Member

@yohannahbautista @jbrcna Yes i see something wierd in the example. If you change the locale say 3 times it always shows the previous locale not the one you just changed it to? A bit confusing so maybe we should fix that in the example too 👍🏻

@CindyMercadoReyes
Copy link
Collaborator

BDD Attached.
BDDStory_github5663.docx

@yohannahbautista yohannahbautista moved this from Failed QA (beta) to Pending Review in Enterprise 4.59.x (Dec 2021) Sprint Dec 20, 2021
@yohannahbautista yohannahbautista moved this from Pending Review to Failed QA (beta) in Enterprise 4.59.x (Dec 2021) Sprint Dec 20, 2021
@ericangeles ericangeles moved this from Failed QA (beta) to In progress in Enterprise 4.59.x (Dec 2021) Sprint Dec 21, 2021
@ericangeles ericangeles moved this from In progress to Pending Review in Enterprise 4.59.x (Dec 2021) Sprint Dec 22, 2021
@tmcconechy tmcconechy moved this from Pending Review to Ready for QA (beta) in Enterprise 4.59.x (Dec 2021) Sprint Dec 23, 2021
@jbrcna
Copy link
Contributor

jbrcna commented Dec 28, 2021

this is now working as expected. thank you! v4.59.0-dev
https://main-enterprise.demo.design.infor.com/components/datagrid/example-export-format.html

@jbrcna jbrcna moved this from Ready for QA (beta) to Done in Enterprise 4.59.x (Dec 2021) Sprint Dec 28, 2021
@NewCoffee1
Copy link
Author

What means Enterprise 4.59.x (Dec 2021) Sprint? When will this function be available?

@EdwardCoyle
Copy link
Contributor

@NewCoffee1 this one is available in the current release: https://github.com/infor-design/enterprise/releases/tag/4.59.3

@NewCoffee1
Copy link
Author

This means for MT customers it will be available after the february update?

@tmcconechy
Copy link
Member

Sorry @NewCoffee1 i dont know what that means about Mt customers and Feb update.... All i can say is the fix was already released in Jan and should still be fixed in the upcoming monthly release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team: appbuilder Issues for the App builder team type: enhancement ✨ [5] Velocity rating (Fibonacci)
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

8 participants