Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix for www.baidu.com #13329

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Fix for www.baidu.com #13329

wants to merge 11 commits into from

Conversation

Yersmagit
Copy link
Contributor

@Yersmagit Yersmagit commented Oct 3, 2024

Update log:

  • New:
  • Fix:
    • Fixed style errors in encyclopedia cards, event cards, essay cards, calendar cards, weather cards, time cards, AI assistant cards, translation cards, ancient poetry cards, ancient text cards, Chinese character cards, famous quote cards, information cards, stock cards, lottery cards, map cards, travel cards, express delivery cards, Baidu Health cards, product cards, and their secondary menus on the search results page.
    • Fixed style errors in the homepage, including advanced search, skin settings, search settings, weather card, image search, and their secondary menus.
    • Fix the style errors on the user login page.
    • Fix the style errors on the Baidu Hot Search page.
    • Fixed the style error of the search box when redirecting from the homepage to the search results page.
    • Fixed the :hover style errors of history and search prediction below the search box.
    • Fix other known issues.

@Yersmagit
Copy link
Contributor Author

Update log:

  • Fix:
    • Fix the style error on the Baidu Chinese card in the search results page.
    • Fix the text color error on the Baidu Product Collection page.

@Yersmagit
Copy link
Contributor Author

There is an issue with this version, and this branch will be temporarily closed.

@Yersmagit Yersmagit closed this Oct 4, 2024
@Yersmagit Yersmagit reopened this Oct 5, 2024
Fix errors
@Yersmagit
Copy link
Contributor Author

Yersmagit commented Oct 5, 2024

The serious issue has been fixed and the pull request has been reopened!

Update log:

  • New:
    • Adapt to the editing pages of homepage stock cards and bookmarked website cards.
    • Adapt to search result pages related to "Baike Star Map". Example
  • Fix:
    • Fallback some of the code that caused the page style hierarchy conflict in the last update.
    • Fix the style error in the business selection bar below the search box.
    • Fix the style error of the AI Document Assistant card and Baidu Chinese card in the search results page.
    • Optimize the search box with :hover style.
    • Optimize the shadow of some selector styles.
    • Optimize the :hover style of some elements on the homepage.
    • Optimize the style of some secondary menus, including their scrollbars.
    • Fix the style error on the stock page.
    • Fix other known issues.

Due to the complex style definition structure used by the developers of this website (For example, styles defined in :root are rarely used), there is a lot of code required to fix it. Please forgive me, reviewer!

Fix errors
Fix errors
Fix errors
Fix errors
Fix errors
@Myshor
Copy link
Collaborator

Myshor commented Oct 7, 2024

First I just want to confirm it's done because it was closed, opened more fixed added after opening.

If yes then I will try to go through it. 😉

@alexanderby
Copy link
Member

Are these huge fixes required? If I remove all Baidu fixes completely, it looks perfect, except for one page where Dark Reader didn't process inline background image https://www.baidu.com/s?wd=%E5%8E%86%E5%8F%B2%E4%B8%8A%E7%9A%84%E4%BB%8A%E5%A4%A9

@Yersmagit
Copy link
Contributor Author

@Myshor:
First I just want to confirm it's done because it was closed, opened more fixed added after opening.

If yes then I will try to go through it. 😉

Yes, the code for this branch is already complete and can be merged.

@Myshor
Copy link
Collaborator

Myshor commented Oct 12, 2024

@Yersmagit
Yes, the code for this branch is already complete and can be merged.

Can you show some before after like you did in the previous PR #13225

Because like Alexander wrote... Did we really need that much CSS in fixes? We try to keep fixes only for things that are not readable at all not making whole new CSS style to make page look perfect. (at least I am trying to keep it that way)

@Yersmagit
Copy link
Contributor Author

@Myshor
Can you show some before after like you did in the previous PR #13225

Because like Alexander wrote... Did we really need that much CSS in fixes? We try to keep fixes only for things that are not readable at all not making whole new CSS style to make page look perfect. (at least I am trying to keep it that way)

Okay, here is a small selection of before and after effects for the fixes.

Before After
1 image image
2 image image
3 image image
4 image image
5 image image
6 image image
7 image image
8 image image
9 image image
10 image image
11 image image

To make it easier to read, I used web translations in some of the images, but this may also cause issues with the website layout.

Since this website is a search engine, a lot of content is only displayed when specific keywords are searched for, so some minor errors may not be noticed until after a few uses. Furthermore, the website has a huge user base in specific countries or regions, such as China, and I believe that these fixes will be very useful to many people. I also hope that this will help make the website more readable and user-friendly in Dark Reader's dark mode, which could help the extension receive more positive reviews.

Copy link
Collaborator

@Myshor Myshor left a comment

Choose a reason for hiding this comment

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

First link you gave here: https://www.baidu.com/s?rtt=1&bsst=1&cl=2&tn=news&ie=utf-8&word=example

With your fixes:
Dark Scheme:
obraz

Light Scheme:
obraz

Without any fixes to www.baidu.com:
Dark Scheme:
obraz

Light Scheme:
obraz

This shows why making too big CSS fixes is not so welcome.

2nd link with your fixes: https://www.baidu.com/sf/vsearch?pd=video&wd=example
Dark Scheme:
obraz

Light Scheme:
obraz

Without any www.baidu.com fixes:
Dark Scheme
obraz

Light Scheme:
obraz

Again it's a point to not merge as with your CSS fixes there is some problems with light scheme.

I do not know why you make logo white as it looks fine without it.

My proposal is to do the big refactor here what is really needed and what is added because you wanted to have something lighter in dark mode.

If you don't like this option then at least check your CSS and not force color there but

use ${color} where the color is the original color to invert(100%) and hue-rotate(180deg). So example how to use this... Let's pretend you use some color now like #334455 instead if you want to have same effect you use ${#AABBCC}

like I already mentioned in PR #13255

Then after the changes push it here to review.

Optimize the code to utilize dynamic colors
@Yersmagit
Copy link
Contributor Author

Optimize the code to utilize dynamic colors, and fix errors.

@Myshor
Copy link
Collaborator

Myshor commented Nov 30, 2024

I will ask the same as @alexanderby last time.

Are these huge fixes required? If I remove all Baidu fixes completely, it looks perfect, except for one page where Dark Reader didn't process inline background image https://www.baidu.com/s?wd=%E5%8E%86%E5%8F%B2%E4%B8%8A%E7%9A%84%E4%BB%8A%E5%A4%A9

Now even on this page I do not see any fixes needed.

in sitefixes we try to have only necessary fixes and in this PR I see over 800 new lines which I do not know what they are really needed for as I can not see any urgent need for fixes on the pages which links was mentioned here.

For me it's to reject in this form but I am leaving that decision to Alexander.

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.

3 participants