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

Revamp Import & Setting - UI Switching #745

Merged
merged 21 commits into from
Apr 7, 2022
Merged

Conversation

kiyote33
Copy link
Collaborator

Added UI Switch for TSML UI and back to Legacy UI.
Refactored Import Settings page to group settings and features with tabs and cards.

Closes Issue #368

includes/variables.php Outdated Show resolved Hide resolved
readme.txt Outdated Show resolved Hide resolved
@joshreisner
Copy link
Contributor

sorry for all the feedback! other than the stuff noted above and below, it works well with some light testing locally.

permalink pages should not show legacy ui, they should redirect. eg /meetings/my-meeting-name should redirect to /meetings?meeting=my-meeting-name. /locations/my-location should either redirect to /meetings or 404.

might want to use the SVG version of the logo, attaching here:
logo

a few formatting issues: on the import page, at a certain breakpoint the right column wraps over the full-width column. the full-width column goes off the page, and the info bullets aren't showing:
import

on the settings page, more right column breaking strangely. might be nice to have this be 33% up to a certain point and then jump to 50% or 100%.
settings

@kiyote33
Copy link
Collaborator Author

kiyote33 commented Mar 23, 2022 via email

@brianw-area24
Copy link
Contributor

I think I can help. When you have tsml_ui selected, and you click on the meeting details, you get something like:
http://local.test/wp4/meetings/mc-cormick-place-group-8/
This should be redirected to:
http://local.test/wp4/tsml-ui/?meeting=mc-cormick-place-group-8

My suggestion for how to do this, in the init.php file, in the function tsml_single_template(), check if it's using tsml_ui, and if so, use the wp_redirect() function to redirect to this URL

@joshreisner
Copy link
Contributor

thanks @brianw-area24 -- good callouts. i'd forgotten about the widgets.

@kiyote33 thanks for all the work yesterday, the formatting / wrapping issues are fixed now. looks like some new padding got introduced on the settings pages though. it will look best if the left edge of text can be consistent throughout

Screenshot 2022-03-23 at 07-50-11 Import   Settings ‹ wordpress demo — WordPress

also i don't think this bordered appearance is working visually. maybe we should go back to the simple bulleted appearance we had before?
Screen Shot 2022-03-23 at 7 45 22 AM

finally, i think we might need to split public.scss into two files now. most of the file is related to the TSML frontend, and we don't need to display that when TSML UI is selected -- it could cause unexpected behavior and we will want to deprecate it at the same time as the rest of the code. however there are a few lines at the end that are wordpress-specific that we will want to keep: https://github.com/code4recovery/12-step-meeting-list/blob/master/assets/src/public.scss#L1214-L1268. it would be fine to put this off for a future PR though :)

@kiyote33
Copy link
Collaborator Author

Here's a view of the Import tab with the vertical meetings summary list and variable card heights. Does this work?
image

@joshreisner
Copy link
Contributor

looks a lot better, thanks! there is still some margin strangeness which you may be working on. looks like paragraphs don't have any bottom padding, it would be good to separate these for readability especially in the "where's my info" section. also there's some extra left margin in the description under "import data sources."

@kiyote33 kiyote33 requested a review from brianw-area24 March 24, 2022 01:21
Fixed issue with permalinks.
Set summary list to vertical bullets.
Removed redundant html from template files. Added widget support.
Segregated Import & Settings tab code to their own separate files.
includes/init.php Outdated Show resolved Hide resolved
includes/init.php Outdated Show resolved Hide resolved
includes/init.php Outdated Show resolved Hide resolved
includes/init.php Outdated Show resolved Hide resolved
readme.txt Outdated Show resolved Hide resolved
<?php
tsml_assets();

echo do_blocks( '<!-- wp:template-part {"slug":"header","theme":"twentytwentytwo","tagName":"header","className":"site-header","layout":{"inherit":true}} /-->' );
Copy link
Contributor

Choose a reason for hiding this comment

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

also here: looks like this adds functionality specific to the twenty twenty two theme. what happens if it's a block theme but not twenty twenty two? should we be checking if that theme is installed? or can we think of a solution for block themes that doesn't require twenty twenty two?

@joshreisner
Copy link
Contributor

joshreisner commented Mar 29, 2022

when the user makes a change to any of the cards, the confirmation message shows up inside the "General" card -- this seems like it would be preferable to show up in the box that was changed, or above all the boxes

admin-message

includes/init.php Outdated Show resolved Hide resolved
includes/init.php Outdated Show resolved Hide resolved
includes/init.php Outdated Show resolved Hide resolved
@kiyote33
Copy link
Collaborator Author

kiyote33 commented Apr 1, 2022

@brianw-area24 @97eighty @tech2serve @joshreisner Seems like we may be ready for a merge. Can we get everyone signed off before doing so?

@joshreisner
Copy link
Contributor

@kiyote33 thanks, it's looking good. the only is i see at this point is the block-theme stuff does not seem ready to me. per my comment above, we are assuming that twenty twenty two is installed if we see a block theme. if you install a different one (i tried one called "skatepark" you see no header or footer, and the html is not valid.

also i don't think it really fixes twenty twenty two either, see screenshot below.

i'd rather not introduce code that only partly fixes one theme and causes a regression in others. my recommendation is to remove wp_is_block_theme checks in archive-meetings.php and init.php, remove archive-tsml-ui-blocks.php and rename archive-tsml-ui-classic.php to archive-tsml-ui.php.

twenty twenty two:
twenty-twenty-two

@joshreisner
Copy link
Contributor

but it's fine with me if you want to merge this PR and we as a team can handle it in a future PR. all i'm saying here is i don't think we should ship this block theme support in 3.14 unless we confirm it works right in twenty twenty two and other block themes first…

@kiyote33
Copy link
Collaborator Author

kiyote33 commented Apr 1, 2022

That's fine. It definitely does not work right at this time, so I will follow your suggestions.

@joshreisner joshreisner self-requested a review April 1, 2022 22:47
Copy link
Contributor

@joshreisner joshreisner left a comment

Choose a reason for hiding this comment

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

🎉 🥇

@kiyote33 kiyote33 dismissed tech2serve’s stale review April 4, 2022 18:37

Not available for re-review.

@brianw-area24 brianw-area24 merged commit 0b555a7 into develop Apr 7, 2022
@brianw-area24 brianw-area24 deleted the revamp-setting branch April 7, 2022 03:22
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.

4 participants