[3.0] Theme - #7933
Conversation
| echo User::$me->avatar['image']; | ||
|
|
||
| echo '<span class="textmenu">', User::$me->name, '</span></a> | ||
| echo '</a> |
There was a problem hiding this comment.
If we do this for the avatar image, shouldn't we use a alt text for the name?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
b7c6385 to
3a78afe
Compare
|
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. |
3ba4ff5 to
c823a49
Compare
|
I’m working on this Can be fixed later too, but also requires some tweaks.
I don’t have a preference, we might discuss it later for sure. |
2322f68 to
ada494b
Compare
|
@live627 Can you rebase this or merge and fix conflicts? |
|
We have this pending 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 |
|
Once I can get around to testing and merging that, I'll rebase this branch again |
| <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> |
| <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> |
There was a problem hiding this comment.
<label>...</div> => <label>...</label>?
|
@jdarwood007 I moved some of the login javascript to its own file but don't know how to test cors requests. |
|
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. |
Wave 4, day two — parts 11 to 33, and the thing that is now actually in the wayPicking up from the status a day ago. Wave 4 has gone from ten parts to thirty-three, and half the areas are now closed out rather than merely started. Theme parts since the last update
55 theme PRs in total, 33 merged, 22 open. The nine So the slices take this branch's structure and naming and The bug count, again — and why I think it is now the real bottleneckSince the split started on 1 August: 70 non-theme bug PRs, 17 merged, 53 still open. Yesterday that number was 23. Today alone it went up by about twenty. I am not raising this as a complaint about review speed. I am raising it because the open queue has started to block the split itself, in a specific and repeatable way:
To sweep the topic display at all today I had to build a scratch branch of There is also a self-inflicted lesson in here that is worth stating publicly, because it nearly cost me: I measured six of the CSS slices on Areas now closed outFive of the ten areas from the plan are done, in the sense that everything portable has been taken and everything left has a written reason. (Profile and the admin centre are done apart from one CSS-coupled bundle each; those are in the table further down.)
A pattern worth naming, since it accounts for most of today's finds: 3.0's type declarations turn survivable 2.1 bugs into 500s. A string from Worth recording against yesterday's estimate table, which put topic display at 4–6 theme parts: it produced none. That is the third area running where the honest answer was "the diff is reverts, here is what running the pages found instead", and I now expect it to be the normal outcome for the remaining template areas rather than the exception. What is still open in this PRTwo areas, plus the CSS-coupled bundles that cut across them:
Also recorded rather than shipped, so they are not lost: Next sessionLogin / Register / Reminder, which is the last unstarted area, then the CSS-coupled bundles in the order Profile → Admin → The single most useful thing anyone else could do is #9405 and #9459. Both are small, both make an entire area of the forum work again, and both are currently on the critical path for the rest of this split. 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. |
Wave 4 complete — per-area template groupsWave 4 covered the second of the three groupings asked for on this PR: template changes 34 parts, #9382 through #9487. Parts 1–11 are merged; 12–34 are open. The parts, by area
What the wave turned upMost of what is left in the snapshot is older than The raw diff has stopped being a progress measure. The end condition needs restating too. That diff will never reach zero. Roughly forty Two blockers surfaced, both outside the split. The bundled Font Awesome cannot render: The areas whose diff yielded nothing still produced work. Posting and personal messages Wave 5What remains of this PR is, by construction, the visual restyle: everything that could land Planned for it:
One note on sequencing. Wave 5's bundles edit the same files as wave 4's open parts, so |
register.js worked out what each field was by reading its id and looking for substrings in it, so a field had to be called smf_autov_pwmain and the template had to write out two nested spans called smf_autov_pwmain_div and smf_autov_pwmain_img for it to draw an icon into. Nothing outside this file ever addressed any of those. The field now carries data-autov, and the icon is built where it is used. That takes twelve lines of markup out of the two templates and the id-sniffing out of the script, and leaves the ids free to be about the labels, which is what Register's are now for. Rendering is unchanged. The icons are the same main_icons check, valid and invalid spans in the same place, the inputs still take valid_input and invalid_input, and the username icon is still the link that asks the server. Two things that fell out of it: The blur handler that asks whether a username is taken was attached to every verified field, so typing a password fired a username lookup. It is the username's now. refreshMainPassword() took a flag whose only purpose was to stop it and refreshVerifyPassword() calling each other forever. The rule itself is now a function both of them ask, so neither has to know about the other. Part of the #7933 split. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
Wave 5 complete — the visual restyle begins, and dark mode landsWave 5 was the first wave whose review criterion is "here is what changes, and why" rather
They are stacked in that order, because each one is what makes the next possible. One rule the wave establishedA change that must prove nothing moved and a change that must show what moved do not belong Dark mode was broken in four places, not oneThe plumbing has been in 3.0 since Alpha and none of it had ever run. Turning the flag on was
The stylesheet is written, not portedThe snapshot's What is there instead overrides 243 tokens, restates no rules, and is written against How it was checked
One methodological trap worth passing on: a computed-style comparison is sensitive to forum The editor, and where the mode stopsPart 3 found the last light island: the editor's own stylesheet had never been tokenised, so One of its tokens is not a colour. Every toolbar icon is cut from a single raster sprite, so The mode stops at the iframe. The surface you type on is a separate document, and Things that turned out not to be trueTwo items this PR has carried for a while do not survive contact:
While testing that, something else surfaced that is worth flagging on its own: every Wave 6 — profileThe profile area is the next wave on its own, because it is bigger than it looks and the The obvious first move — lift the profile rules out of
And the snapshot's own So wave 6 re-derives the file from Wave 7 — what is left after thatNamed now so the shape is visible, not scheduled:
The standing note from wave 4 applies unchanged: what remains of this pull request is the |
The colour mode plumbing has been in 3.0 since Alpha: Theme.php resolves the mode, Themes.template.php and ThemeOptions.php offer it to the admin and the member, index.template.php writes it into data-mode, and dark.css has sat in the theme as a placeholder. None of it has ever run. Turning the flag on was not enough, because the feature is broken in four places rather than one. loadMode() had no callers. It is the method that resolves the mode and loads dark.css, and nothing anywhere invoked it, so data-mode was never emitted and the stylesheet was never asked for. It is now called beside loadVariant(), which is its sibling and is read by the same line of the template. The 'system' mode lost the very thing that makes it 'system'. That mode works by loading dark.css with a (prefers-color-scheme: dark) media attribute, but attributes are only printed for files served on their own - loadCSSFile() defaults to minimizing, and a file folded into the bundle loses them. The browser was never asked, so 'system' would have meant 'always dark'. That mode now opts out of the bundle; 'light' and 'dark' carry no attribute and still share one cached file. Saving the chosen mode to a member's profile was fatal. Db::insert() wants a list of rows and was handed a single flat one, which is a critical error rather than a warning outside backward compatibility mode, so the first time a logged in member chose a mode the page died. loadVariant() has the identical defect three lines further down; it is left alone here because this branch neither enables nor exercises variants, and shipping an unverified fix is worse than recording a known one. dark.css itself is written against release-3.0's own tokens rather than ported. The snapshot on #7933 could not be used: of its 197 overrides only 84 name a token that exists here, while 213 colour-bearing tokens here have no value in it. It overrides 243 tokens and restates no rules, all written against twelve values declared at the top of the file, so the way to review it is to agree those and then check each component reached for the right one. The ramps are deliberately untouched, so a variant still re-tints the forum by moving --primary-color-hue and dark mode moves with it. Verified on a running forum. Light mode is unchanged: the computed colours of 4254 elements over twelve pages are identical with the file present and absent. All three modes emit the right markup and the right stylesheets, including the media attribute on 'system' alone. Eighteen pages were swept in both modes for text that lands on a background too close to it; dark mode has nineteen elements below the AA ratio against light mode's hundred and thirty-six, and both dark causes sit outside the theme - the bundled coloris colour picker, which carries no tokens at all, and the Administrator group's online_color, which is data. No errors were logged. Signed-off-by: Mathias Alberts <mathiaspapealbert@hotmail.com> Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
Wave 5 is merged, and wave 6 — the profile — is upAll four of wave 5 landed: #9496, #9497, #9498 and #9500. Wave 6 is three
Part 1 — and why a block move would have been wrong
A profile-only stylesheet containing those would have quietly unstyled all of them, on pages So the split was done by resolving every selector against the templates that actually emit it, Two went out entirely rather than moving: The snapshot's own Part 2 — two blind spots the last wave leftWave 5 claimed the theme's colours were all reachable by the colour mode. Two kinds were not, Borders written as a shorthand. That sweep matched A token that was never declared. This one is subtler and is the more useful lesson. Excluding VerificationBoth parts are strict no-ops in light mode, checked against a running forum rather than by
Part 1's twenty-two are all eleven profile areas, the five pages that share those selectors, The profile itself then swept clean: eighteen areas in dark mode, 1854 elements carrying text, One measurement worth passing on. Part 1's first comparison reported a single difference — a Why wave 6 stops at threeThe rest of the profile's delta is not portable, and each piece has a specific reason:
Wave 7Unchanged from the last update, and now next: the admin centre settings grid — where a |
Wave 6 is merged; wave 7 is up, and three of its four items closed without needing a pull requestWave 6 landed in full — #9547, #9548, #9549. Wave 7 is two pull requests, both
The colour mode is now everywhere#9557 closes the last gap. The surface you type on is an iframe with its own document, so The useful discovery is that the mechanism was already there. The editor plugin already One decision in there is worth stating plainly, because it looks like an omission otherwise. Sixteen literals in the editor's own stylesheet became tokens along the way. They are named Captions that were never linked#9558 comes from asking, of every form control in the theme, whether anything gives it Nine of those twenty-six are cases where the caption belongs to exactly one control and to What makes it reviewable is that the theme already does this correctly elsewhere. The very Left alone deliberately, each because it needs new wording and so deserves its own change: the Three items closed by measuring rather than buildingWave 7 was planned as four things. Three of them turned out not to need a pull request, and Attachments need nothing. Now that #9459 has merged and uploads work again, the area was A And a correction to something I wrote in the last update. I recorded the admin settings What is missing is a reason. The floats already pair each row correctly and clear properly, so Where that leaves this pull requestThe colour mode now reaches every part of the theme it can reach. Excluding the token files What is left of this pull request is the two areas that need designing rather than porting: The end condition is unchanged from wave 4: this closes when every remaining hunk is either |
Where the split stands, and what is actually leftWaves 1 to 6 are merged. Wave 7 is open as #9557 and #9558. The reference snapshot this series ports from had drifted a long way behind 213 files → 98. Eight of those are the FontAwesome webfont binaries already dropped with That number still is not a to-do list, and it is worth repeating why, because it looks like a A porting hazard that now matters more than it didThe snapshot predates several merged fixes, and it rewrites whole files. Two confirmed cases,
Checking either out wholesale would silently revert a merged fix. Every remaining file the Next step, ready to start, no decisions neededFinish the RTL migration.
81 of about 129 declarations are pure direction flips that What makes this the right next wave rather than merely a large one is that the pattern is After that, large but structuredThe editor overhaul, deferred since wave 1 for being too big to review as one unit and still Questions, with a recommendation for eachThree of these I can answer myself and have; three need somebody else's call. 1. Do the seven 2. Is 3. Does the 4. Is a visual change to the admin settings layout actually wanted? (needs a decision) 5. Should Login / Register / Reminder be restyled at all? (needs a decision) 6. FontAwesome: vendor a release, or drop the icon work? (needs a decision) One question about pace rather than content24 PRs from this series are open awaiting review. Wave 4 stopped producing PRs at roughly 90 |







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.