vednoc / dark-whatsapp

Complete, dark and light, very customizable theme for WhatsApp.
MIT License
444 stars 51 forks source link

Theme doesn't work on new WhatsApp update #30

Closed rafitamolin closed 5 years ago

rafitamolin commented 5 years ago

Screenshot: https://i.imgur.com/4hNVLgl.png

Pescovisck commented 5 years ago

image Same here

arguablykomodo commented 5 years ago

image Can confirm

furai commented 5 years ago

Yup, getting the same issue as above right now. Did they change some parent class? Cause it looks similar to what it was before.

tinyCoder32 commented 5 years ago

They changed all the class names with yesterdays update.

vednoc commented 5 years ago

Awesome. Literally 95% of things is broken and it'll take a while to fix. I'm so not looking forward to it. :disappointed:

tinyCoder32 commented 5 years ago

@vednoc Please don't give up, I was about to publish my new addon version that have a whole section to customize your dark mode:

image

Just this morning i realized from testers that it's broken now. I will try to help, but please don't give up.

vednoc commented 5 years ago

(...) I will try to help, but please don't give up.

I won't give up, it's just disappointing to see everything gone in one update. It was an expected doomsday scenario, so to speak. Everything will be back to normal but things won't be as polished.

Also debating whether to refactor to stylus-lang preprocessor like in my other themes which unfortunately makes it more difficult for you guys that use the theme outside of Stylus but that makes it easier for (anyone) to contribute or for me to add/change/remove things in the future.

arguablykomodo commented 5 years ago

This is why i don't like auto-generated class names and css modules. At any point in time all the classes can randomly change their name and mess with userstyles.

vednoc commented 5 years ago

I don't like them either! It was a very sad day back when WA decided to use them. I had to rewrite everything from scratch -- that was the moment when I decided to put this theme into a separate repository.

tinyCoder32 commented 5 years ago

For next time, why don't you just save every component with a variable name that refers to it, and then simply when WhatsApp update the class names later it will just be simple "Find & Replace" commands to replace the old class names with the new ones?

I just did this with the extension i'm coding as in most of its features it also depends on the class names, so I converted the dynamic class names to static variables such as senderChatBubble = '.whatEver-Class' ... sideBar = '#side' ...

Can we do this with your CSS?

tinyCoder32 commented 5 years ago
image

This is how WhatsApp saving them anyway, as the extension have access to the page scripts, I guess I can always predict the new class names, I will investigate further and reply back.

BTW: if any of you have a saved WhatsApp Web page on his computer, I can easily do a comparison and a simple Find & Replace process to replace the old class names with the new ones, unfortunately, I don't have a copy of the older version that was working.

vednoc commented 5 years ago

The markup changes or they rearrange things around. It doesn't seem it'd be that simple to find a good solution. One thing that would help a lot would be to use IDs more since they don't seem to change, as well as attributes in the markup, but they're not available on each and every element (i.e. the modal: <div class="..." data-animate-status-v3-modal-background="true">).

One thing that is true is that the code needs to be structured in a better way -- something that'd be so much easier with stylus-lang.

tinyCoder32 commented 5 years ago

I will search for someone who have an old copy of the WA web version to provide a temporary fix until you find out some solution. I hope that stylus-lang can export a compiled css file at the end, so that I can use it in the addon, does it?

vednoc commented 5 years ago

I'll actually patch this up tonight and start refactoring when I have more time. Good thing they didn't change markup (as far as I can tell) otherwise it'd be a very sad day. :grimacing:

I hope that stylus-lang can export a compiled css file at the end, so that I can use it in the addon, does it?

Yes, though that might take a little bit to set up. You could always steal the compiled CSS from the browser so it shouldn't be that big of a deal. :smile:

vednoc commented 5 years ago

Hotfix is out. Tomorrow I'll be able to spend more time fixing things. Thank you all for waiting patiently. :blush:

tinyCoder32 commented 5 years ago

Thank you so much! looking forward to see the new version covering all the issues.

vednoc commented 5 years ago

The v1.4.1 is out; gotta re-do starred messages because the colors are a bit off. Feel free to spam me things that are broken so I can prioritize them over polishing minor things. :sweat_smile:

JoaaoVerona commented 5 years ago

@vednoc Kinda off-topic, but thank you very much for this dark theme and the fast fix. Spectacular work!

colineberly commented 5 years ago

I was going through the css and finding all the selectors that have been changed. If you go by color it's a much quicker experience. Thanks @vednoc for addressing this so quickly and putting out the hotfix. I know it can be tedious and easy to give up on.

vednoc commented 5 years ago

Mostly done, v1.4.3 is out.

I think the 'unknown sender' for people that aren't your contacts is still broken and I have no way to check it out. If someone could do it and give me a snippet of that part, I'd be very thankful!

Also, take a moment to vote for what I should do in #32. I'm looking for some feedback. :smiley: