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

Customization (DT) Beta - Font Icon Picker #2078

Merged

Conversation

kodinkat
Copy link
Contributor

Screenshot 2023-05-23 at 16 25 40

…ield icon rendering logic to better support font icon displaying
@corsacca corsacca requested a review from prykon May 23, 2023 16:14
Copy link
Collaborator

@prykon prykon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kodinkat Thanks so much for coding this! I'm testing it as we speak.

In order to keep the UI consistent, could you...?

  • Make the edit field settings modal card flip and make the icon selector modal unflip
  • Add the dt-admin-modal-overlay class when opening the icons modal

Thanks again!

@kodinkat
Copy link
Contributor Author

kodinkat commented May 24, 2023

@kodinkat Thanks so much for coding this! I'm testing it as we speak.

In order to keep the UI consistent, could you...?

  • Make the edit field settings modal card flip and make the icon selector modal unflip
  • Add the dt-admin-modal-overlay class when opening the icons modal

Thanks again!

@prykon That's now in for you... Updating font icon picker dialog to adopt flip animation turned out to be slightly fiddlier then anticipated; so let me know if anything...

@prykon
Copy link
Collaborator

prykon commented May 26, 2023

@kodinkat I would add a margin: 1.5em to the .ui-dialog-buttonset
Aside from that, everything looks good!

@prykon
Copy link
Collaborator

prykon commented May 31, 2023

I think we're good to merge, @corsacca

@corsacca
Copy link
Member

corsacca commented Jun 2, 2023

@kodinkat
I tried changing one of the milestones icons and the display shows:
image

@kodinkat
Copy link
Contributor Author

kodinkat commented Jun 5, 2023

@prykon @corsacca - See if recent updates now address multi-select mdi icon preview issues.

@prykon
Copy link
Collaborator

prykon commented Jun 5, 2023

@kodinkat Icon updates properly on the admin page and dt frontend but not if it's inside a multi select...

This is ok
Screenshot 2023-06-05 at 10 40 39

This is broken
Screenshot 2023-06-05 at 10 42 04

@kodinkat
Copy link
Contributor Author

kodinkat commented Jun 5, 2023

@prykon try it now and let me know.. :)

@prykon
Copy link
Collaborator

prykon commented Jun 5, 2023

@kodinkat It works now! Found one more bug, though...

Screenshot 2023-06-05 at 13 40 57

Looks like this:
Screenshot 2023-06-05 at 13 40 44

@corsacca
Copy link
Member

corsacca commented Jun 6, 2023

@prykon, That looks like an issue with the Church Health and not with the implementation of the font icon picker. Maybe a separate issue?
I bet it does the same with setting a church health icon to a font icon in the legacy settings.


<?php
// Determine icon html element shape to be adopted.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kodinkat, font icons need to use the font-icon field, not the icon field, then the code at line 340 works

…health logic to support displaying of font icons
@kodinkat
Copy link
Contributor Author

kodinkat commented Jun 6, 2023

@prykon @corsacca give it a try now and let me know how things hold up, especially on the group church health side of things! :)

@prykon
Copy link
Collaborator

prykon commented Jun 6, 2023

@kodinkat Looks good now!

@@ -91,7 +239,9 @@ jQuery(document).ready(function ($) {
* Icon selector modal dialog
*/

function display_icon_selector_dialog(parent_form, icon_input) {
function display_icon_selector_dialog(parent_form, icon_input, callback = function (source) {
console.log(source);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this debug or needed?

@@ -313,7 +469,9 @@ jQuery(document).ready(function ($) {
* Icon selector modal dialog - Handle Icon Save
*/

function handle_icon_save(dialog, parent_form, icon_input) {
function handle_icon_save(dialog, parent_form, icon_input, callback = function (source) {
console.log(source);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kodinkat is this debug or needed?

@corsacca
Copy link
Member

corsacca commented Jun 6, 2023

@kodinkat @prykon looking good guys.
@kodinkat i tried adding a new field and got:
image
There is a trim() error, but then show:

this is what a new field (multi_select) looks like:
image

@kodinkat
Copy link
Contributor Author

kodinkat commented Jun 7, 2023

@kodinkat @prykon looking good guys. @kodinkat i tried adding a new field and got: image There is a trim() error, but then show:

this is what a new field (multi_select) looks like: image

@corsacca sanity checked new field / option flows and both held true for me. @prykon does it hold true for you?

Screenshot 2023-06-07 at 10 20 05

Screenshot 2023-06-07 at 10 20 56

Screenshot 2023-06-07 at 10 24 09

Screenshot 2023-06-07 at 10 25 38

Screenshot 2023-06-07 at 10 27 17

@prykon
Copy link
Collaborator

prykon commented Jun 7, 2023

@kodinkat Thanks for hanging in there for this one; so many ins and outs!

I found a bug...
Screenshot 2023-06-07 at 09 50 45

Steps to reproduce:

  1. Create a new field
  2. Click to edit the field (no icon image is shown, but this might be out of scope)
  3. Edit the field name only (don't change icon settings)
  4. Re-click to edit the field (icon image now appears but is broken).

Apparently, it's saving the icon value to undefined and that also breaks the frontend...
Screenshot 2023-06-07 at 09 59 40

@kodinkat
Copy link
Contributor Author

kodinkat commented Jun 8, 2023

@kodinkat Thanks for hanging in there for this one; so many ins and outs!

I found a bug... Screenshot 2023-06-07 at 09 50 45

Steps to reproduce:

  1. Create a new field
  2. Click to edit the field (no icon image is shown, but this might be out of scope)
  3. Edit the field name only (don't change icon settings)
  4. Re-click to edit the field (icon image now appears but is broken).

Apparently, it's saving the icon value to undefined and that also breaks the frontend... Screenshot 2023-06-07 at 09 59 40

@prykon thanks for this and for the steps; which helped me to reproduce! A fix has now been pushed, so feel free to have a play and let me know if there are still any remaining hidden bugs..... :)

@prykon
Copy link
Collaborator

prykon commented Jun 8, 2023

@kodinkat
Found a UI thing... the 'Change Icon' button should not be on a new line.
Screenshot 2023-06-08 at 10 24 12

@corsacca Do we want icons on field options for a dropdown field type?

Everything else looks great!

@prykon
Copy link
Collaborator

prykon commented Jun 9, 2023

Looking good, @kodinkat!
I think it's requiring an onclick prevent default or something.

Screen.Recording.2023-06-09.at.09.17.31.mov

@kodinkat
Copy link
Contributor Author

kodinkat commented Jun 9, 2023

Looking good, @kodinkat! I think it's requiring an onclick prevent default or something.

Screen.Recording.2023-06-09.at.09.17.31.mov

@prykon thanks for this... However, issue not showing up on my end for .change-icon-button button class types or any other buttons..

Anyway, just to be on the safe-side, I've added e.preventDefault() on .change-icon-button click events; but not on any others, to avoid disrupting any pre-existing logic..

@prykon
Copy link
Collaborator

prykon commented Jun 9, 2023

Looking good, @kodinkat! I think it's requiring an onclick prevent default or something.
Screen.Recording.2023-06-09.at.09.17.31.mov

@prykon thanks for this... However, issue not showing up on my end for .change-icon-button button class types or any other buttons..

Anyway, just to be on the safe-side, I've added e.preventDefault() on .change-icon-button click events; but not on any others, to avoid disrupting any pre-existing logic..

@kodinkat It's working now! Also, no other bugs found.

@corsacca are we good to push?

@corsacca
Copy link
Member

corsacca commented Jun 9, 2023

Very nice work guys! :) @kodinkat @prykon

@corsacca corsacca merged commit 43b57e8 into DiscipleTools:master Jun 9, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants