Skip to content

[3.0] Theme - #7933

Closed
live627 wants to merge 152 commits into
SimpleMachines:release-3.0from
live627:theme
Closed

[3.0] Theme#7933
live627 wants to merge 152 commits into
SimpleMachines:release-3.0from
live627:theme

Conversation

@live627

@live627 live627 commented Dec 4, 2023

Copy link
Copy Markdown
Contributor

This is the new theme started by @TwitchisMental

I still need to convert several form grids to use CSS grids instead of floats. Also the grids abuse definition list markup, something tat has always annoyed me from the very beginning.

Submitting as a draft now to get early feedback.

@live627 live627 added the Theme label Dec 4, 2023
@Sesquipedalian Sesquipedalian added this to the 3.0 Alpha 4 milestone Dec 4, 2023
Comment thread Themes/default/css/index.css
Comment thread Themes/default/css/custom.css Outdated
Comment thread Themes/default/index.template.php Outdated
Comment thread Themes/default/index.template.php Outdated
echo User::$me->avatar['image'];

echo '<span class="textmenu">', User::$me->name, '</span></a>
echo '</a>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If we do this for the avatar image, shouldn't we use a alt text for the name?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should use href or url then.
Or should 'image' provide it by default? It would be good in case an external avatar is missing in other parts of the forum.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think either is valid. I believe it just needs something to be valid for screen readers. Since its a link to the users profile and we removed the name, the alt should have it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Then I think 'image' should provide the alt text by default. An external avatar could suddenly not load or disappear, would be good to have it.

Comment thread Themes/default/scripts/register.js
@live627

live627 commented Dec 28, 2023

Copy link
Copy Markdown
Contributor Author

I notice that a few forms would disable textareas on submit, such as the posting form. I've changed this to do all forms by using the new HTML property to make the entire form inert.

@live627
live627 force-pushed the theme branch 2 times, most recently from 3ba4ff5 to c823a49 Compare December 28, 2023 06:58
@dragomano

Copy link
Copy Markdown
Contributor

Icons in the admin area are not indented enough:
sshot-11

Unable to load the '' template at Forum Maintenance - Routine:
sshot-12

SCEditor doesn't have a dark theme?
sshot-13

Instead of "X Posts" and "Y Topics", maybe it would still be better to keep "Posts: X" and "Topics: Y" as it is now?
sshot-14

@DiegoAndresCortes

Copy link
Copy Markdown
Member

Icons in the admin area are not indented enough: sshot-11

I’m working on this

SCEditor doesn't have a dark theme? sshot-13

Can be fixed later too, but also requires some tweaks.
Check this topic: https://www.simplemachines.org/community/index.php?topic=586626.0

Instead of "X Posts" and "Y Topics", maybe it would still be better to keep "Posts: X" and "Topics: Y" as it is now? sshot-14

I don’t have a preference, we might discuss it later for sure.

@live627
live627 force-pushed the theme branch 2 times, most recently from 2322f68 to ada494b Compare December 29, 2023 03:14
@jdarwood007 jdarwood007 changed the title Theme [3.0] Theme Jan 20, 2024
@jdarwood007

Copy link
Copy Markdown
Member

@live627 Can you rebase this or merge and fix conflicts?

@DiegoAndresCortes

Copy link
Copy Markdown
Member

We have this pending
live627#44

Will start sending more in upcoming weeks, but it could be merged, rest of changes are more focused so can be in separated PR's

@live627

live627 commented Jan 30, 2024

Copy link
Copy Markdown
Contributor Author

Once I can get around to testing and merging that, I'll rebase this branch again

Comment thread Themes/default/Reminder.template.php Outdated
<div class="windowbg form_grid">
<p class="descbox">', Lang::$txt['authentication_options'], ':</p>
<p>
<input type="radio" name="reminder_type" id="reminder_type_email" value="email" checkeiv></label>

@dragomano dragomano Feb 9, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

checkeiv => checked?

Comment thread Themes/default/Register.template.php Outdated
<input type="submit" value="', Lang::$txt['save'], '" name="save_reserved_names" tabindex="', Utils::$context['tabindex']++, '" class="button">
<div class="form_grid">
<div>
<label for="matchword">', Lang::$txt['admin_match_whole'], '</div>

@dragomano dragomano Feb 9, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

<label>...</div> => <label>...</label>?

@live627

live627 commented Feb 20, 2024

Copy link
Copy Markdown
Contributor Author

@jdarwood007 I moved some of the login javascript to its own file but don't know how to test cors requests.

@jdarwood007

Copy link
Copy Markdown
Member

When this is closer to ready I can check it. You need to run 2 domains (or 2 subdomains) and have the forum on one and the script on another. A simple SSI page where you can open the user area popup is good enough for most things. Sending credentials such as on the login form may also need to be tested, but when you can open the user area, the CORS request works.

This was referenced Aug 8, 2026
@albertlast

Copy link
Copy Markdown
Collaborator

Wave 4 status, and what is left

Wave 4 is the per-area template group — the middle one of the three groupings asked for in this comment. Ten parts are open, and the wave is not finished.

Theme parts so far

Wave Merged Open
1 — no theme templates touched #9332 #9333 #9334 #9335 #9337 #9338
2 — CSS foundation #9350 #9351 #9352 #9353 #9354 #9355 #9356 #9357 #9361
3 — global chrome #9369 #9370 #9371 #9372 #9373 #9374 #9375
4 — per area #9382 #9385 #9386 #9388 #9390 #9391 #9392 #9393 #9403 #9404

32 theme PRs so far, 22 merged. Wave 4's ten are all small and independent of each other, except #9403, which stacks on #9385 — it can only share the board index's template_bi_* helpers once #9385 has taken template_main() out of that file.

The thing I did not expect: the bug count

Splitting this branch has turned up 23 bugs that have nothing to do with the theme, six merged and seventeen open. They are not theme changes, so per the grouping asked for they went straight to release-3.0 on their own. Most were found by running a stock forum rather than by reading the diff.

The ones that stop a page working outright:

And the quieter ones — wrong output rather than no output: #9400 (every board reports "0 topics and 0 posts awaiting approval"), #9408 (every board move target reads "Before {name}"), #9398 (8 of the 22 shipped smileys have an empty tooltip), #9397, #9399, #9402, #9407, #9409, #9394, #9401, #9396.

Three of these came out of sweeps rather than from reading code, and each found something the compiler and php-cs-fixer cannot see: class names that do not resolve inside a sub-namespace (#9395, #9396), getTxt() calls naming a language file that does not hold the key (#9397), and ICU arguments passed in the wrong shape (#9408). The scripts are short and have no false positives left in them; I have offered them as a CI step in those PRs, and they are yours if you want them.

How many theme PRs are still to come

Honestly: I do not know, and every estimate so far has been wrong. Wave 1 was planned as 8 parts and shipped 6. Wave 3 was planned as one part and shipped 7. Wave 4 was planned as ~10 areas and has produced 10 parts without finishing a single area.

The best I can offer is a shape rather than a number. Still to come:

Area Rough size
Topic display + postbit (Display.template.php, postbit.css, attachments.css) 4–6
Profile (Profile.template.php, profile.css, profile.js — the largest single area) 5–8
Posting (Post.template.php, Actions/Post.php) 3–5
Admin centre (Admin.template.php, admin.css, the remaining Manage* templates) 4–6
Login / Register / Reminder (+ their JS) 3–4
Personal messages 2–3
Message index remainder 2–3
Calendar grids and top bar (+ calendar.css) 2–3
Long tail — Search, Stats, Memberlist, Recent, Help, Errors, ModerationCenter, MoveTopic 4–6
Wave 2 leftovers — dark.css and icons.css content, variants, RTL to logical properties 4–6
Editor / SCEditor remainder, deferred from wave 1 3–5

That is roughly 35 to 55 more, and I would not defend either end of it. What I am confident about is the shape: they stay small, one area at a time, and the count per wave is only knowable once the wave is under way.

Two things are still held up:

  • Board index markup is deferred, not blocked by anything here: .board_icon a::before takes its glyphs from Font Awesome, and fontawesome_source = local is broken in release-3.0 for the same reason wave 1's self-hosting part was dropped — the shipped fontawesome.min.css has no @font-face rules, so the webfont files are referenced by nothing. That is its own issue rather than a slice of this PR.
  • Sources/Actions/Post.php and Editor.php are entangled with the SCEditor plugin work deferred from wave 1, so the posting area probably has to wait for that.

On the progress metric

git diff release-3.0 theme-ref --stat is no longer a useful measure and I want to be straight about why. It currently reads 131 files, larger than the 110 it started at, because release-3.0 has gained files this branch does not have — variables.css, dark.css, icons.css, AGENTS.md, the section-comments fixer — several of them because of this split. I have also not merged release-3.0 forward into the reference snapshot recently, which inflates it further. Judging progress per area is the only honest way to read it, and by that measure waves 1 to 3 are done and wave 4 is perhaps a fifth of the way in.

Attribution unchanged: this is @live627's work, with @TwitchisMental, @DiegoAndresCortes, @sbulen and @jdarwood007 on the branch. The split is only a delivery mechanism for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants