-
Notifications
You must be signed in to change notification settings - Fork 60
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
[SFT-604] Add Created and Updated users #942
Conversation
packages/client/src/app/pages/forms/edit/builder/tabs/form-settings/settings.sidebar.tsx
Outdated
Show resolved
Hide resolved
packages/client/src/app/pages/forms/edit/builder/tabs/form-settings/settings.sidebar.tsx
Outdated
Show resolved
Hide resolved
packages/client/src/app/pages/forms/edit/builder/tabs/form-settings/settings.sidebar.tsx
Outdated
Show resolved
Hide resolved
packages/plugin/src/migrations/m231219_105754_AddUsersToFormsTable.php
Outdated
Show resolved
Hide resolved
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.
Looks really good. I tested upgrade as well as fresh install. Behavior seems correct. One improvement, however, would be to remove the link to other users if they don't have the Edit → Edit users
Craft permission. Currently it just links to #
which isn't the greatest. 🙂
packages/client/src/app/pages/forms/edit/builder/tabs/form-settings/settings.ownership.tsx
Outdated
Show resolved
Hide resolved
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.
Stellar!
Just two more small updates and we're all set here.
packages/plugin/src/Bundles/Transformers/Builder/Form/FormTransformer.php
Outdated
Show resolved
Hide resolved
packages/plugin/src/Bundles/Transformers/Builder/Form/FormTransformer.php
Outdated
Show resolved
Hide resolved
c41fff3
to
8a999f2
Compare
@gustavs-gutmanis @kjmartens All PR feedback has now been addressed |
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.
Looks good to me 👌
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.
One issue I noticed is that the time is not correctly localized to me. I am GTM-06
and it's currently 12:00 PM
here, but the time saved shows 01/05/2024, 6:00 PM
. When I change my timezone to another one, it changes with it, but they are wrong, too. Is it possible the timezone offset is "backwards" or something?
Also, should the date and time formatting not respect the Craft localization? For example, if I switch my language to Russian
, it shows up the same (with am
/pm
etc), but in Craft Entries it switches to 05.01.2024, 13:09
. It isn't a massive deal, but my assumption was that with the recent changes you made, this was the intention? 🙂
Yeah, I can see some issues with the localization. It's not quite working the way I thought it would when using the |
@gustavs-gutmanis can you meet with @aaronlinley to let him know which adjustments are necessary to resolve this? 🙂 |
I can see You could try using the Intl.DateTimeFormat to achieve this. Or as an alternative - use Craft's date localization methods to send a parsed date string from the server already. |
@kjmartens @gustavs-gutmanis I've updated the datetime handling to be more reliable now. It sends a ISO string from the server to the frontend, and uses |
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.
Hmm, I am still seeing no difference.
- Times are still +6hrs ahead for me (e.g. should say 11:00am for me, but says 5:00pm). My timezone is GMT-6.
- When I switch to a European locale for my user, dates/times are not formatted any differently (e.g. uses 12hr clock instead of 24hr clock).
- I am getting a new issue... about 30% of the time, a manual page refresh in the builder doesn't show the builder and console logs the following errors:
vendor.js?v=1704819269:2 TypeError: Cannot read properties of undefined (reading 'created')
at t.SettingsOwnership (client.js?v=1704819269:1:259266)
vendor.js?v=1704819269:2 Uncaught TypeError: Cannot read properties of undefined (reading 'created')
at t.SettingsOwnership (client.js?v=1704819269:1:259266)
The part of the JS file it refers to is:
c.utcToZonedTime)(new Date(e.created.datetime), t)
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.
Looking good! 👍🏻
…feat/SFT-604 # Conflicts: # packages/plugin/src/Resources/js/client/client.js
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.
Wonderful
No description provided.