luci-base: Make some tables better searchable#8191
luci-base: Make some tables better searchable#8191Ramon00 wants to merge 1 commit intoopenwrt:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
b0657fb to
faf464d
Compare
|
Is there a quick litmus test that I can use to verify the changes? I use FF and search works fine there. |
|
@systemcrash the issue is reproducible on Chromium based browsers Steps to reproduce
|
|
Thanks @vincejv - I'm aware. I don't run Chrome anything, which is why I ask for another way to verify... |
|
Please test on a mobile screen after this change, that content approach was used to be able to dynamically hide/re-position row titles to headlines when decomposing the table into cards. |
I think the progession part is sufficiently tested. I think testing regression impact is more important, i.e. is the visual layout affected? So Firefox test would be great to do as well.
If i view it portrait on mobile its pretty identical (other than a grey background bar missing in e.g. the rule name). Oh also the text is not in bold anymore (mobile or desktop), its same style as the other text, if needed I can make it bold again, if people prefer that. (The bold was not that functional I thought, but im fine either way). Just let me know what people prefer. |
it doesn't work on Safari either, tested on iPhone with iOS 26.2, now if someone can do the same test on Mac. |
Chromium based browsers suffer from this "feature" (=not searching painted items). This is a design choice as those ::before elements should only contain visual things, not relevant information. We can question if this is the right choice in the browser or not, but regardless, chromium based browsers suffer from this. I think the market share is enough of chromium based browsers to warrant fixing this. What I do think needs maybe more testing is if on all browsers the patch does not mess up the layout anywhere (we dont want to substitute one issue for another). |
|
safari is not chromium based though. However chromium based browsers uses blink engine which was forked from WebKit. this design decision could stem back from WebKit. So if we fix this upstream, we have to file 2 separate issues for both WebKit/Safari and Chromium. However, since search only “works” correctly in Firefox, I agree with you that it makes sense to follow the behavior of the two engines with much larger user bases. |
|
I agree |
faf464d to
07ac4b7
Compare
|
Updated all themes now. |
|
What happens on mobile? :) |
|
The label text ("printer port") should be slightly bigger and bold afair |
Currently the font is not bigger, the only delta is it being bold. How big do you want it to be? |
|
|
This changes the "name" in specific tables from being painted to being rendered. This allows the use of "ctrl-f" in browsers to e.g. search for firewall rule names. Signed-off-by: Ramon Van Gorkom <Ramon00c00@gmail.com>
07ac4b7 to
2677578
Compare
|
I can add something like |
| trEl.appendChild(E('th', { | ||
| 'class': 'th cbi-section-table-cell', | ||
| 'data-sortable-row': this.sortable ? '' : null | ||
| }, (!this.anonymous || this.sectiontitle) ? _('Name') : null |
There was a problem hiding this comment.
}, [ (!this.anonymous || this.sectiontitle) ? _('Name') : null ]There was a problem hiding this comment.
To be honest, i dont think the square brackets are needed here, we only add a single element not an array. Looks like appendChild also only supports a single element. Maybe it is actually better to remove them in line 2580 as well?
I did do a quick search in the luci code base and both are used. So both seem to work. Let me know if you want me to add it here or remove on 2580
This changes the "name" in specific tables from being painted to being rendered. This allows the use of "ctrl-f" in browsers to e.g. search for firewall rule names. Closes #7708 Signed-off-by: Ramon Van Gorkom <Ramon00c00@gmail.com> Link: #8191 Signed-off-by: Paul Donald <newtwen+github@gmail.com> (cherry picked from commit 720c96c)
|
Hi @Ramon00 @systemcrash , I have a suggestion that might help maintain backward compatibility: One idea is to add a simple flag to indicate that <td data-title="xxx" data-no-before></td>
<tr data-title="xxx" data-no-before></tr>With this flag, themes could use a selector to conditionally apply the old ::before styles, enabling backward compatibility, for example: .td[data-title]:not([data-no-before])::before {
/* original styles */
}
.tr[data-title]:not([data-no-before])::before {
/* original styles */
}This would allow older versions of LuCI that still rely on ::before to continue displaying the first column correctly, while the new implementation remains unaffected. |
|
Hmm - thanks for the information @eamonxg. I won't pick this to previous versions - only to 25.12. Those are some good suggestions. |
Thanks for the reply, I hope this could be considered, as third-party themes need to support both versions before 25.12 and the latest version. A simple |
|
Yeah indeed you can't just update or install one of the two halfs. Adding style data into the js code makes updating in the future more complicated. I guess just using this on 25.12 is probably a good compromise, as it only affects the test releases where you can expect some "bugs" and only have limited audience, while still keeping the code not too complicated. |
I am all for removing obsolete code. The thing is, you have to be careful not to break something if that data-title tag was still used. Leaving it in may also make debugging easier. Removing those tags will of course not fix the issue of installing a later version of a theme with an old version of the luci code. Regardless the issue will be gone once rc4 gets build (i guess rc3 got tagged just two days too early, maybe for some of the builds its already ok...) |
|
You can still image build in a few days a get the new theme. |
Following upstream LuCI commit 720c96c, the first column is now explicitly handled as a field rather than a pseudo-element. This prevents layout duplication and ensures compatibility with the new table rendering logic. Ref: openwrt/luci#8191










This changes the "name" in specific tables from being painted to being rendered. This allows the use of "ctrl-f" in browsers to e.g. search for firewall rule names.
Can anybody test this out? If no issues, I will then also change the other themes.
P.S. Any reason why there is 2nd section in the css file:
Maybe just remove this as well?