Translations + UI Refactor (#396)
* Translated using Weblate (English (United States)) Currently translated at 100.0% (316 of 316 strings) Translation: Playlet/Playlet Translate-URL: https://hosted.weblate.org/projects/playlet/playlet/en_US/ * Translated using Weblate (German) Currently translated at 100.0% (316 of 316 strings) Translation: Playlet/Playlet Translate-URL: https://hosted.weblate.org/projects/playlet/playlet/de/ * Translated using Weblate (French (Canada)) Currently translated at 98.7% (312 of 316 strings) Translation: Playlet/Playlet Translate-URL: https://hosted.weblate.org/projects/playlet/playlet/fr_CA/ * Fix case * remove "unfinished" attribute * UI Refactor (#394) * Setting category refactor * tweak * Wip navbar * profile icon support * screen offset * Nav bar animation * Flexible navbar * initial focus fix * Fix settings * changelog * comment * Lint fix --------- Co-authored-by: Lacey Anaya <yecakeh263@anawalls.com> Co-authored-by: github-action linter <githubaction@githubaction.com>
This commit is contained in:
37 files changed
+3190
-1914
No files matched your search
@@ -1,68 +0,0 @@
|
||||
namespace Tests
|
||||
|
||||
@suite
|
||||
class NavBarTests extends Rooibos.BaseTestSuite
|
||||
|
||||
@describe("NavBar")
|
||||
|
||||
@beforeEach
|
||||
function _()
|
||||
m.navBar = CreateObject("roSGNode", "NavBar")
|
||||
m.navbar.appController = CreateObject("roSGNode", "AppController")
|
||||
m.navBar@.BindNode()
|
||||
end function
|
||||
|
||||
@it("Populates the buttons based on content node")
|
||||
function _()
|
||||
items = [
|
||||
{
|
||||
text: "Item1"
|
||||
},
|
||||
{
|
||||
text: "Item2"
|
||||
}
|
||||
]
|
||||
|
||||
m.navBar.items = m.CreateContentNode(items)
|
||||
|
||||
buttonGroup = m.navBar.buttonGroup.getChildren(-1, 0)
|
||||
|
||||
m.assertArrayCount(buttonGroup, 2)
|
||||
|
||||
m.assertEqual(buttonGroup[0].text, "Item1")
|
||||
m.assertEqual(buttonGroup[1].text, "Item2")
|
||||
end function
|
||||
|
||||
@it("Clears the buttons when content node is invalid")
|
||||
function _()
|
||||
items = [
|
||||
{
|
||||
text: "Item1"
|
||||
},
|
||||
{
|
||||
text: "Item2"
|
||||
}
|
||||
]
|
||||
|
||||
m.navBar.items = m.CreateContentNode(items)
|
||||
buttonGroup = m.navBar.buttonGroup.getChildren(-1, 0)
|
||||
m.assertArrayCount(buttonGroup, 2)
|
||||
|
||||
m.navBar.items = invalid
|
||||
buttonGroup = m.navBar.buttonGroup.getChildren(-1, 0)
|
||||
m.assertArrayCount(buttonGroup, 0)
|
||||
end function
|
||||
|
||||
function CreateContentNode(items as object) as object
|
||||
contentNode = CreateObject("roSGNode", "ContentNode")
|
||||
for each item in items
|
||||
navBarItem = CreateObject("roSGNode", "NavBarItem")
|
||||
navBarItem.text = item.text
|
||||
contentNode.appendChild(navBarItem)
|
||||
end for
|
||||
return contentNode
|
||||
end function
|
||||
|
||||
end class
|
||||
|
||||
end namespace
|
||||
Reference in new issue
Block a user