Commit graph

5155 commits

Author SHA1 Message Date
Tobias Hunger
3e1312fed1 Janitor: Make cspell ignore some words in a source file 2021-07-08 21:48:31 +02:00
Tobias Hunger
2fdfbae33e Janitor: Remove unnecessary lifetimes 2021-07-08 20:43:38 +02:00
Tobias Hunger
08a6dc02fc Janitor: Find char, not a str 2021-07-08 20:43:38 +02:00
Tobias Hunger
bf48a6c65e Janitor: Remove some unnecessary returns 2021-07-08 20:43:38 +02:00
Tobias Hunger
63bc31aa44 Janitor: Remove unnecessary closure 2021-07-08 20:43:38 +02:00
Tobias Hunger
35dd3ed282 Janitor: Remove redundant clone() calls 2021-07-08 20:43:38 +02:00
Tobias Hunger
b57c27cf04 Janitor: Allow nonstandard_macro_braces in SixtyFPSElement macro 2021-07-08 20:43:38 +02:00
Tobias Hunger
f24df0f94f Janitor: Typo fixes 2021-07-08 20:43:38 +02:00
Olivier Goffart
0be7f19663 iot-dashboard: Have the temperature pane show the same text as the orginal 2021-07-08 17:44:50 +02:00
Olivier Goffart
8e52b7d865 Fix bug that caused two way binding to sometimes disapear 2021-07-08 17:44:50 +02:00
Simon Hausmann
344dbab1a5 Provide a tiny bit of feedback when pressing the rounded buttons 2021-07-08 17:26:14 +02:00
Simon Hausmann
cbd8f44c11 Fix opacity in devices buttons
Apply the opacity only to the background fill, like in QSkinny.
2021-07-08 17:15:22 +02:00
Olivier Goffart
78f3a21e5c iot-dashboard: add some interaction on the widgets 2021-07-08 15:22:10 +02:00
Olivier Goffart
b96b565840 iot-dashboard: Some interaction with the light intensity 2021-07-08 15:06:22 +02:00
Olivier Goffart
88d6c227cf iot-dashboard: Make the README in markdown and add in the example dir
Also change the url to the demo and editor to the snapshots/master
since this is the README for the git repository's master branch
2021-07-08 14:27:27 +02:00
Olivier Goffart
2144975cca iot-dashboard: better initial size 2021-07-08 14:27:27 +02:00
Simon Hausmann
be47f708d9 Cleanup: Move docs/html to docs/resources 2021-07-08 07:01:51 +02:00
Simon Hausmann
6d964b9ee7 Switch highlightjs version
Use the latest version that's also hosted on sixtyfps.io
2021-07-08 07:01:51 +02:00
Simon Hausmann
7cc915ed8e Add sub resource integrity hashes for the CDN urls 2021-07-08 07:01:51 +02:00
Simon Hausmann
dd73852124 Make use of highlight.js self-contained
* Instead of relying on an unversioned url off of sixtyfps.io,
  pin the version from upstream's CDN.
* Include cmake highlighting as well since that's not in HLJS' default,
  we use it for the tutorial though and it was in the one hosted on
  sixtyfps.io
* Include the language definition for .60 inline, so that we can make changes
  and adapt to upstream API changes if we select a new version.
2021-07-08 07:01:51 +02:00
Simon Hausmann
ad321c7735 Use one shared html file for the syntax highlighting
Using Olivier's idea to check the meta tag, we can distinguish rustdoc
from "the rest". The html is included in mdbook by directly by
symlinking head.hbs.
2021-07-08 07:01:51 +02:00
Simon Hausmann
8003c06f3a Move all HTML/CSS/JS related to preview and syntax highlighting in the docs into a shared folder
This will also be the place where the .60 language definition for
highlight.js can go.
2021-07-08 07:01:51 +02:00
Tobias Hunger
3f5ad42683 Janitor: Fix typo in comment 2021-07-08 06:47:05 +02:00
Tobias Hunger
b6ff90ed42 Janitor: No clippy::eval_order_dependence in FieldOffsets macro
The entire point of this code is that it is order dependent, so it
makes little sense to warn about that!
2021-07-08 06:47:05 +02:00
Olivier Goffart
4604b70463 We need to collect the ressources in the root component 2021-07-07 19:45:50 +02:00
Olivier Goffart
a987b225b5 Collect all used components before inlining
And do some passes before inlining

We will need the list of components before inlining in order to generate
them if we disable inlining

So we can do some passes on each component before they are inlining

I tried to put the flickable pass in that list, but it did not work
if the Flickable itself is the root of a component
2021-07-07 17:58:43 +02:00
Olivier Goffart
6cd9d77abd Test flickable to actually test something
For some reason the test was disabled, and one of the value was off

Also add a InheritFlickable (just so we test Flickable in sub components)
2021-07-07 17:48:34 +02:00
Simon Hausmann
260b4dc72e cSpell: Ignore the github workflow yaml files
They're full of paths and other spelling unrelated terms :)
2021-07-07 14:12:49 +02:00
Simon Hausmann
43d20dece9 Add support for .60 syntax highlighting in C++ docs
Relates to #281
2021-07-07 14:00:04 +02:00
Simon Hausmann
77898796da Rust docs: Split up the preview from the syntax highlighting
The preview is now in sixtyfps-docs-preview.html and the highlighting in
sixtyfps-docs-highlight.html. This faciliates reusing the preview from
C++ while using a different HTML file later for syntax highlighting.

Relates to #282
Needed for #281
2021-07-07 14:00:04 +02:00
Olivier Goffart
b1c680ca13 CI: skip a broken test in the updater test
The rotate test had duplicated id and would therefore no longer compile
2021-07-07 12:44:11 +02:00
Olivier Goffart
920903ad19 Throw an error if there are duplicated id in a component 2021-07-07 12:31:40 +02:00
Olivier Goffart
c40a0bb5d6 passes: don't prefic the passes with passes::
the run function was moved to the passes module, so all passes are in scope
2021-07-07 11:49:42 +02:00
Simon Hausmann
0236bbcf07 Avoid overriding rustdoc highlighting
Only run highlight.js on .60 code blocks, to not interfere with rustdoc

Relates to #282
2021-07-07 11:36:22 +02:00
Simon Hausmann
8ecddc120a Try to add syntax highlighting for .60 snippets in Rust documentation
Load our highlight.js snippet that we also use for the mdbook tutorial.
Once change we need to apply on top is that the rustdoc CSS theme does
not currently provide hljs classes that change with the currently
selected theme, so instead we're mapping the classes to the CSS classes
that are used for Rust syntax highlighting. Those change with the
current theme.

Relates to #282
2021-07-07 11:13:54 +02:00
Olivier Goffart
f73a369786 cargo fmt 2021-07-07 11:04:50 +02:00
Olivier Goffart
8f75aadc70 Move the passes module to its own file
The main reason is that i don't like to edit files named lib.rs
because there are so many files with the same name
2021-07-07 10:48:28 +02:00
Simon Hausmann
59f79df242 Ignore VS code workspace files
These tend to be local
2021-07-07 09:12:28 +02:00
Tobias Hunger
e5bdeaa804 Janitor: Remove unnecessary & 2021-07-07 08:42:28 +02:00
Simon Hausmann
9784415a7e Fix invalid CMake package config files when using different build types
As we try to copy the different location target properties from the
corrosion target into the package config file, we need to take all the
usual build types into account, not only Debug/Release.

Especially RelWithDebInfo is popular among packagers.
2021-07-06 23:07:35 +02:00
Tobias Hunger
23708a4a12 Janitor: Disable clippy error about f32 comparison 2021-07-06 22:54:05 +02:00
Tobias Hunger
ac207428dc Janitor: CSpell fixes
Mark up some special words in documents (like C++ lingo in rust files).
2021-07-06 22:44:09 +02:00
Tobias Hunger
ac2d17e8e4 Janitor: Remove unnecessary format! 2021-07-06 22:34:21 +02:00
Tobias Hunger
c1c9e591f7 Janitor: Simplify if X.is_none() { return None } to X?; 2021-07-06 22:34:21 +02:00
Tobias Hunger
56885bd71d Janitor: Remove useless type conversion 2021-07-06 22:34:21 +02:00
Tobias Hunger
4d712b3f4f Janitor: Clippy suggests to collapse these ifs 2021-07-06 22:34:21 +02:00
Tobias Hunger
af0f193f1d Janitor: Fix clippy::if_same_then_else error
In this case this feels at controversial, but in general I find this
clippy lint pretty helpful: It has caught several copy-paste errors
before.

No behavior change is intended with this patch.
2021-07-06 21:28:36 +02:00
Olivier Goffart
4c6bb37507
Spell check CI: don't report faillure
There are too many words not in the dictionary, so don't show a CI faillure when there is a spelling mistake. Just show the warnings in the PR
2021-07-06 11:57:09 +02:00
Olivier Goffart
67f0dc280f ptimized unused propery away
Currently, it is a bit limited in the amount of property that it removes
because it will not remove property that are used by properties being
removed, or will consider setting properties as an usage
2021-07-05 15:39:49 +02:00
Tobias Hunger
4be9ca7ffd Janitor: Remove useless () return types 2021-07-05 09:48:29 +02:00