Telegram Web
Have you ever wondered what does the button titled ”Download the workspace” do? This button is very useful if you make use of custom palettes! Let's see how.

Let's define a color in the theme's custom palette, one of the ways you can do it is ”Edit the theme's custom palette” at the top → ”Add a new color” (define as much as you want and choose colors you like). If you download your theme using the button in the bottom right corner or ”Download .attheme directly” and open this file in the editor again, you won't see the palette you defined. What a pity!

If you use the ”Download the workplace" button, you'll get an .attheme-editor file. And this is not a theme you can apply in Telegram. The editor saved its internal representation of the theme. If you open the file in the editor, you'll see the palette in its original state. The editor saves everything in this file, including the theme's name and the custom palette. You may rename the file, but the editor will show the name saved in the file contents and not from its name.

This button will become even more useful with updates. We're planning on making linkage of variable, just like .tdesktop-theme does. When downloading an .attheme, all the linkage will have to be resolved and you won't be able to restore it back from .attheme. But with .attheme-editor, you'll always have a version of your theme with all linkage saved.
The editor now has support for wallpapers and strange behavior of variables in previews, so now we can cover more variables! 💪

Thanks to @danicotra for the first preview with chat_wallpaper!
Wow, there are 37 (thirty seven!) new variables in the latest update of Telegram. I haven't checked it out myself yet, but as far as I can see they are the variables for things we couldn't change for a long time. Recently the developer @DrKLO saw my article on bugs and replied that he'd fix them. I'm really happy now; thank you, @DrKLO!

So, we're going to update the editor with new variables as soon as possible, but before this I'll make two update statements for developers who use attheme-js and attheme-default-values. I'll do it here: although it's not the place for them, but the topic is pretty similar (and yeah, the editor uses them too), and the updates are important.
So, let me begin.

Yesterday I found a bug in attheme-js that led to wrong parsing of themes from @themesporterbot. attheme-js assumed that the file ends with \nWPE\n when it has a wallpaper, bu themes generated by the porter bot ended with \nWPE. I've updated the package so it always finds where WPE is.

If you have anything working on attheme-js, please update it, especially if you work with wallpapers. The new version is 1.1.2.
And on attheme-default-values. Recently I updated it to 5.0.0 because it has one breaking change. Using CommonJS, you should require it this way:
const defaultValues = require(`attheme-default-values`).default;

Note that .default at the end — the package has moved to ES Modules, so the way you required it before won't work anymore. If you used ES Modules before, it shouldn't harm you.

Also I follow SemVer starting with 5.0.0. Previously I tried to match Telegram's version, but now I'm going to publish 5.1.0 with those 37 new variables, and new variables will always be published as a patch change.

(Also if you use TypeScript, I provide declarations files since 5.0.0! The package was rewritten in it, and so will other my packages in a while.)
A brief update for developers of .attheme tools:

First of all, we've written a Rust crate for working with .attheme files. Check it out!

Second, we've rewritten attheme-js from scratch: now it has a better API and provides you with many tools you'll need when working with .attheme. It's been rewritten in TypeScript, and we now provide you typings so you can develop tools in TypeScript easier.

Third, attheme-default-values is deprecated in favor of attheme-js. You can find the default theme under attheme-js/lib/defaultThemes/default.
Telegram v5.0 has come out, and .attheme editor is already up to date with new variables!

But v5.0 not also brought new variables, but also deleted a bunch of old ones regarding colored headers. .attheme editor will show those as Removed since v5.0 so you can upgrade your themes more smoothly.

attheme-js and attheme-rs are also updated to v2.1.4 and v0.2.0 respectively with support of the new variables. Note that attheme-rs is now only compileable with Rust 2018, so be sure to install Rust 1.31 before updating the crate.
We've released a new version of .attheme editor to fix one bug. The bug is that opening themes with @atthemeeditorbot failed with an error. Now it works as good as always 😉

Just a reminder: whenever you face a red dialog saying ”Whops, an error happened”, you should report it to @snejugal or on our GitHub repository. That error always indicates a bug in the editor that must be fixed or properly handled by the editor. With your bug report, the editor will get a little better :)
FInally, .attheme editor is now available in Spanish! Thanks to @DiegoCanevaro for translation 👍
Finally, .attheme editor is released with new variables! Great thanks to @twitface for doing most of my work
Hi, devs! I've just released [email protected]. It now has support for the new default themes, including the ability to choose the accent color for the Mono, Dark and Arctic themes. Also, you can now use Attheme#fallbackToOther to fallback a theme to another one, and Attheme#fallbackToSelf that allows you to map new variables to already existing ones. Oh, and you can pass any iterable over [string, Color] to the Attheme constructor.

_But_ the constructor no longer has the second parameter, and instead you should use Attheme#fallbackToOther; all the default themes are now functions that generate Attheme instances; and lib/defaultThemes/default no longer provides all variables — instead, use the variable list at lib/variables.

And yeah, I have also updated attheme-rs to v0.3, which also now comes with updated themes. It no longer overloads + and | operators — use Attheme::fallback_to_other instead. Another noticable change is that the crate moved to using palette::Srgba<u8> instead of [u8; 4],

Hopefully you devs will like these updates! The edtor will also be updated with new variables this weekend, and I hope to make several improvements to the editor later on.
Finally, .attheme editor has updated! The most noticable change is gradient support for wallpapers: you simply start editing chat_wallpaper, choose Gradient and you can set a gradient background for your theme!

Other changes are:
— The variable list is updated to the latest version of Telegram;
— Scrolling theme tabs is now a bit smoother.

Hope you like the update!
Not quite related to the editor itself, but still contributing to the glossary is a good thing to do. Who knows, maybe the glossary will be integrated into the editor one day?
Forwarded from Artem Starikov
Hi everyone! We've already launched the new glossary website at attheme-glossary.snejugal.ru. The Russian glossary is almost moved to the new website, but we need your help with moving the English glossary. You can do it by contributing to the glossary database on GitLab. It isn't a hard thing to do: you only need to sign up for GitLab and use Web IDE to add new sections to the glossary.

As the glossary is getting moved to the new website, we'll also rewrite @atthemeglossarybot to take advantage of the database — it will finally have all the variables, and they'll always be up-to-date!

So, we're really counting on your help to move the glossary to the new website and afterwards constantly update, improve and translate the glossary, especially since contributing has never been easier!
2025/02/06 09:14:44
Back to Top
HTML Embed Code: