.attheme editor blog


Гео и язык канала: не указан, не указан
Категория: не указана


.attheme editor is a powerful editor of Android Telegram themes running in the browser. This channel has news on updates and some tips on using the editor.
Contact the author: @snejugal
Also developer: @AlexStrNik
attheme-editor.snejugal.ru

Связанные каналы

Гео и язык канала
не указан, не указан
Категория
не указана
Статистика
Фильтр публикаций


Finally, .attheme editor is released with new variables! Great thanks to @twitface for doing most of my work


FInally, .attheme editor is now available in Spanish! Thanks to @DiegoCanevaro for translation 👍




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 :)


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.


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.


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.


Update: we've fixed that bug and another one regarding this preview


It seems like something broke in production and this preview doesn't show well, we'll fix that tomorrow


I've updated the editor too, so go check out the new variables and the new previews!


So I published attheme-default-values@5.1.1 with all new variables, the editor's update is coming very soon


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.)


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.


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.


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!


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.


Anyway, we're looking forward to creating a special script 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 scripts that will let scripts do even more.

For example, the script above would be similar to this in our themes script language:
for variable: color in allVariables:
let finalColor

if variable in theme:
finalColor = theme.|variable|
else:
finalColor = copy(color)
|variable|


Sadly, the wallpaper went away, so you should skip 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!





Показано 20 последних публикаций.

78

подписчиков
Статистика канала