Sadly, the wallpaper went away, so you should skip
Unfortunately, we don't have API for managing the wallpaper yet, but we'll come with it in a couple of weeks and it's going to be really convenient!
chat_wallpaper when iterating over all variables if you have an image. But we think you should change the wallpaper too with shifted color with the same rate — at least, Adobe Photoshop definetely can definetely do that, but many other photo editors should support it too.Unfortunately, we don't have API for managing the wallpaper yet, but we'll come with it in a couple of weeks and it's going to be really convenient!
Anyway, we're looking forward to creating a special noscript language for themes with a nice syntax and with all those type checkings we have to do manually now. It's going to be fast even on the web, as we're going to write it in Rust and compile it to WebAssembly for the editor. We'll also have a CLI for running noscripts that will let noscripts do even more.
For example, the noscript above would be similar to this in our themes noscript language:
For example, the noscript above would be similar to this in our themes noscript language:
for variable: color in allVariables:Stay tuned!
let finalColor
if variable in theme:
finalColor = theme.|variable|
else:
finalColor = copy(color)
|variable| <- finalColor
finalColor.hue += 90
Have you ever wondered what does the button noscriptd ”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
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
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
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
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
If you have anything working on
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
Note that
Also I follow SemVer starting with
(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.)
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.)
.attheme editor blog
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…
So I published
attheme-default-values@5.1.1 with all new variables, the editor's update is coming very soon
.attheme editor blog
So I published attheme-default-values@5.1.1 with all new variables, the editor's update is coming very soon
I've updated the editor too, so go check out the new variables and the new previews!
.attheme editor blog
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!
It seems like something broke in production and this preview doesn't show well, we'll fix that tomorrow
.attheme editor blog
It seems like something broke in production and this preview doesn't show well, we'll fix that tomorrow
Update: we've fixed that bug and another one regarding this preview
I've updated .attheme editor with new variables that were added in the latest 4.9.1 update of Telegram. Go update your themes!
Also attheme-default-values is updated, thanks to @twitface.
Also attheme-default-values is updated, thanks to @twitface.
GitHub
GitHub - snejugal/attheme-default-values: A list of the default values of .attheme variables.
A list of the default values of .attheme variables. - snejugal/attheme-default-values
A brief update for developers of
First of all, we've written a Rust crate for working with
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
Third,
.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.GitHub
GitHub - snejugal/attheme-js: A little package for working with .attheme files in JS
A little package for working with .attheme files in JS - snejugal/attheme-js
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
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 :)
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 :)
A brief update: .attheme editor has been updated with new variables for the poll attachment button.
Also I've seen that more people are facing this bug. I swear I'll fix it this weekend 🙏
Also I've seen that more people are facing this bug. I swear I'll fix it this weekend 🙏
GitHub
Expired themes aren't handled properly · Issue #15 · SnejUgal/attheme-editor
If you try to upload a theme that's already expired (either after a timeout of 24 hours or it has already been opened) via atthemeeditorbot, an error will appear saying Failed to execute `atob`...
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
_But_ the constructor no longer has the second parameter, and instead you should use
And yeah, I have also updated
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.
attheme-js@3.0.0. 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.