Skip to content

Commit

Permalink
Change applying and UI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DervexDev committed Mar 20, 2024
1 parent 49b51bf commit d0597b7
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 10 deletions.
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,24 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),

## [Unreleased]

### Fixed

- Locked property error, reported by [@EthanMichalicek](https://github.com/EthanMichalicek) in [#1](https://github.com/argon-rbx/argon-roblox/issues/1)
- Sync confirmation cancellation not working
- Text inputs in Settings widget

## [2.0.0-pre2] - 2024-03-19

### Fixed

- Release workflow installs Wally dependencies
- Release workflow installs Wally dependencies

## [2.0.0-pre1] - 2024-03-18

### Added

- First Argon 2 plugin pre-release
- First Argon 2 plugin pre-release

[Unreleased]: https://github.com/argon-rbx/argon-roblox/compare/2.0.0-pre2...HEAD

[2.0.0-pre2]: https://github.com/argon-rbx/argon-roblox/compare/2.0.0-pre1...2.0.0-pre2

[2.0.0-pre1]: https://github.com/argon-rbx/argon-roblox/compare/8d4d16c128b3400be5ec789bc2f10130e31182b7...2.0.0-pre1
5 changes: 5 additions & 0 deletions src/App/.src.lua
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,11 @@ function App:connect()
result = signal:Wait()
end

if result == 'Cancel' then
self:disconnect(true)
self:home()
end

return result == 'Accept'
else
local options = { 'Continue', 'Cancel' }
Expand Down
4 changes: 1 addition & 3 deletions src/App/Widgets/Settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,7 @@ local function Entry(props: Props): Frame
props.Binding:set(onChanged(text))
end,
Finished = function(text)
text = function()
return text ~= '' and text or Config:getDefault(setting)
end
text = text ~= '' and text or Config:getDefault(setting)

props.Binding:set(text)
Config:set(setting, text, peek(props.Level))
Expand Down
6 changes: 4 additions & 2 deletions src/Config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,10 @@ end

function Config:restoreDefaults(level: Level)
for setting, _ in pairs(self.__configs[level]) do
for _, callback in pairs(self.__callbacks[setting]) do
callback(self:getDefault(setting))
if self.__callbacks[setting] then
for _, callback in pairs(self.__callbacks[setting]) do
callback(self:getDefault(setting))
end
end
end

Expand Down
2 changes: 1 addition & 1 deletion src/Core/Processor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function Processor:initialize(snapshot: Types.Snapshot): Types.Changes
end)

changes:join(diff(childSnapshot, snapshot.id))
else
elseif Dom.isCreatable(child.ClassName) then
changes:remove(child)
end
end
Expand Down
11 changes: 11 additions & 0 deletions src/Dom/.src.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ local function getDefaultProperties(className)
return properties
end

local function isCreatable(className)
local class = database.Classes[className]

if not class then
return nil
end

return table.find(class.Tags, 'NotCreatable') == nil
end

local function readProperty(instance, propertyName)
local descriptor = findCanonicalPropertyDescriptor(instance.ClassName, propertyName)

Expand All @@ -81,6 +91,7 @@ local function writeProperty(instance, propertyName, value)
end

return {
isCreatable = isCreatable,
readProperty = readProperty,
writeProperty = writeProperty,
findCanonicalPropertyDescriptor = findCanonicalPropertyDescriptor,
Expand Down

0 comments on commit d0597b7

Please sign in to comment.