-
Notifications
You must be signed in to change notification settings - Fork 264
[3.0] Theme #7933
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
base: release-3.0
Are you sure you want to change the base?
[3.0] Theme #7933
Conversation
Themes/default/index.template.php
Outdated
| echo User::$me->avatar['image']; | ||
|
|
||
| echo '<span class="textmenu">', User::$me->name, '</span></a> | ||
| echo '</a> |
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.
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.
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.
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.
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.
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.
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 |
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> |
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.
checkeiv => checked?
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> |
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.
<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. |
Sesquipedalian
left a comment
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.
Another partial review, this time about language strings.
I've added some suggestions for particular things. Beyond those, please also make sure to use Lang::getTxt() rather than using Lang::$txt directly. If there are situations where you need to check whether the string exists, please use Lang::txtExists() for that.
Co-authored-by: Jon Stovell <jonstovell@gmail.com>
Sources/Editor.php
Outdated
| 'image' => 'tt', | ||
| 'code' => 'tt', | ||
| 'description' => Lang::$editortxt['tt'], | ||
| 'description' => Lang::getTxt('tt', var: 'editortxt'), |
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.
| }, | ||
| format: '[tt]{0}[/tt]', | ||
| html: '<span class="tt">{0}</span>' | ||
| html: '<code class="bbc_tt">{0}</code>' |
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.
In order to make this work, the command for the tt button will also need to be changed.
However, it will take some effort to do that in a way that works well. I wrote the current code to use <font face="monospace">{0}</font> because using the font tag allowed me to use this.execCommand(), which provides nice and fluid behaviour for applying and/or removing the [tt] BBCode to arbitrary spans of text. You can see this code in the tt command's exec function:
if (font === 'monospace') {
this.execCommand('removeFormat');
} else {
this.execCommand('fontname', 'monospace');
}
In order to use <code class="bbc_tt">{0}</code>, you will need to replace that with some other code to add and remove the <code> tags from around selected text. The following code from the spoiler command's exec function will get you part of the way there.
// If we are currently inside an inline spoiler span, remove it.
const spoilerElement = sceditor.dom.closest(this.currentNode(), '.bbc_inline_spoiler');
if (spoilerElement) {
const rangeHelper = this.getRangeHelper();
rangeHelper.insertMarkers();
rangeHelper.saveRange();
spoilerElement.insertAdjacentHTML('beforebegin', spoilerElement.innerHTML);
rangeHelper.restoreRange();
spoilerElement.remove();
return;
}
// Otherwise, insert it.
this.insert('[spoiler]', '[/spoiler]');
However, this code doesn't fully emulate the behaviour of execCommand(). In the case of the spoiler BBCode that's fine and actually preferable. But in the case of tt, and particularly when removing tt from selected text, a full emulation of the behaviour of execCommand() is desirable.
| <div class="navigate_section"> | ||
| <ul>'; | ||
| <nav aria-label="', Lang::$txt['breadcrumb'], '" class="navigate_section"> | ||
| <ul itemscope itemtype="https://schema.org/BreadcrumbList">'; |
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.
This should be <ol
Sesquipedalian
left a comment
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.
There are also a couple of syntax errors that need to be fixed.
Themes/default/webfonts/index.php
Outdated
| } | ||
|
|
||
| ?> |
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.
| } | |
| ?> | |
| } | |
We're no longer using closing PHP tags as of #8606.
|
Phew. Okay, friends. This PR is huge. There's lots of great stuff in here. But it is unwieldy and all but impossible to review. Additionally, there are some parts of this that have been rendered obsolete by other changes in the meantime, and a few other parts that have issues of one sort or another. For the sake of making the review process more manageable, I would really appreciate it if this could be broken up into a series of logically related parts and resubmitted as smaller PRs. For example, I see that @live627 has done a bunch of work to replace jQuery with native JavaScript. Perhaps most (all?) of that work can be combined into its own PR. Other ideas could be, say, revamping the Admin Control Panel as one PR, revamping the board index as another, revamping the message index as a third, revamping topic display as a fourth, etc. @live627, do you think you can do that for us? |
|
I'm willing to take a peek at this. A huge amount of the work here has been spent "3.0-izing", so we need it. One major problem is that 3.0 has been in flux, so now a lot of it needs to be "re-3.0-ized" & even "re-re-3.0-ized". It has just gone on too long without merging. What I will do:
Splitting it up will be tough, because at this point it will be hard to isolate related changes across so many files, due to the layers upon layers of changes - not only in this PR, but also in the same files/lines of code outside this PR. Like mixing salt & pepper & then trying to separate them back out again. But I'll see what I can do. It may end up that we cannot chunk it up into smaller logical pieces. (Groups of commits would be easy if we don't care about whether they are logically related... The PRs would appear a bit rando, though...) At that point we can discuss a way to proceed with the review. I'll make a proposal. Let me know if you'd like me to proceed. |
|
Any effort would be appreciated |
I'll start working on this. |
|
Thank you, @sbulen! |







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.