Code Monkey home page Code Monkey logo

iris's People

Contributors

aulkhami avatar jakeywastaken avatar michael-48 avatar overhash avatar piquu avatar sigmanic avatar sirmallard avatar sumer9999dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

iris's Issues

Iris ResetOnSpawn Behavior is broken

On player reset, Iris should maintain visibility regardless of PlayerGui ResetOnSpawn and of any ScreenGui ResetOnSpawn, this currently does not happen and resetting leads to an error.

Iris window non-moveable

Every time I try to drag the window (titlebar) somewhere else, nothing happens. This is my code:

wait(5)

local StarterPlayerScripts = game.StarterPlayer.StarterPlayerScripts
local Iris = require(StarterPlayerScripts.Iris).Init(script.Parent)

Iris:Connect(function()
	local windowSize = Iris.State(Vector2.new(350, 250))
	Iris.Window({"Window"}, {size = windowSize})
	Iris.End()
end)

Iris.Inert

Sinks any input onto children widget, effectively making them disabled. Can't use Iris.Disabled since that is a property already. Either Iris.Inert or Iris.InActive?

Refactoring the Table widget

Mentioned by Sluethen on the Roblox OSS Discord server.
image
Table rows are often not aligned if the items are too large. I'm not sure quite was courses this and at the moment I can't remember how Iris.Table handles unevenly sized boxes.

Additionally, if Roblox introdcues a UIFlexLayout then that might be useful to fix this.

Incorrect widget ZIndex when using widgets inside conditional blocks

Overview

I noticed that having a widget in a conditional block causes it to have the same widget ZIndex as the first widget after the conditional block.

It seems like a non-trivial issue to solve, so I'd also appreciate any workarounds.

Reproduction steps

  1. Run this code with Iris
local err = Iris.State(nil)
if Iris.Button("Cause error").clicked() then
    err:set("An error has occurred!")
end

if err:get() then
    Iris.Text(err:get())
end

Iris.Text("Some text afterwards")
  1. Press the button
  2. Observe this result
    RobloxStudioBeta_4n8gLeabuE

Fixed window update latency issue.

As originally fixed in 6fcbfa2, then reverted in b6e4cc3, this should not be fixed until UIFlexItems are released from beta by Roblox, because this change breaks the interoperability between Beta and Non-Beta versions of roblox which exist currently.

Too Many & Too Few End Calls

Im trying to create this exact stack however I getting an error saying:
Callback has too many calls to Iris.End() or To Few calls to Iris.End()
I tried to follow the demo you have on the docs page and then diagnose by looking at your source but I dont know why this is an issue.

Iris.Init()
	
	Iris:Connect(function()
		Iris.Window({"MENU", [Iris.Args.Window.NoResize] = true}, {size = Vector2.new(100, 100)})
		
		if Iris.Button({"Spawn"}).clicked() then
			
			
			RemotesManager.Client:Get("SpawnPlayer"):SendToServer()
			Iris.End()
		end
		
		Iris.End()
	end)

RemoteEvents don't function correctly when using rbxnet

Unsure whether it's my issue or not, but any request gets rejected when using Iris to send it.
Button code:

if Iris.Button({ "Button" }).clicked() then
    local remote = remotes.Client:Get("PrintMessage")
    remote:SendToServer("This should be printed")
end

Server-side code:

remotes.Server:Get("PrintMessage"):Connect(function(plr, message)
	print(message)
end)

Error itself:
net.out.definitions.ClientDefinitionBuilder:54: Expected Promise rejected with no value.
Everything works perfectly fine when using a vanilla Roblox button and the message gets printed.

Rbxnet: https://rbxnet.australis.dev/

InputVector3 broken

InputVector3 is broken if you pass in any args except name

image
it forces you to use vector2's

if you do use them it errors because it trys to index the Z component

image
It also compares a vector to a number?

Im not sure if im missing something here but i dont think so

"Callback has too few calls to Iris.End()"

Literally dying because of this error, I have no idea why this is happening.
Code:

-- this thing handles the shop
local StarterPlayerScripts = game.StarterPlayer.StarterPlayerScripts
local Iris = require(StarterPlayerScripts.Token_Debug.Iris).Init()
local TokenEvent = script:WaitForChild("TokenEvent")
local BuyFunction = script:WaitForChild("BuyFunction")

Iris:Connect(function()
	Iris.Window({"Shop Debug"})
	Iris.Text({"Heya, this is a particle shop I guess."})
	if Iris.Button({"Buy the 1st effect and equip (free)"}).clicked() then 
		local status = BuyFunction:InvokeServer(1, game.Players.LocalPlayer)
		if status == "toopoor" then
			warn("user is poor")
		elseif status == "success" then
			print("you did it")
		elseif status == "failed" then
			warn("datastore fail")
		end
	end
	local tokenmnt = Iris.InputNum({"Token Amount"})
	if tokenmnt.numberChanged() then
		TokenEvent:FireServer(game.Players.LocalPlayer, tokenmnt.state.number)
	end
	Iris.End()
end)

The error:

Callback has too few calls to Iris.End()  -  Client - Internal:266
  21:58:57.629  Stack Begin  -  Studio
  21:58:57.629  Script 'StarterPlayer.StarterPlayerScripts.Token_Debug.Iris.Internal', Line 266 - function _cycle  -  Studio - Internal:266
  21:58:57.629  Script 'StarterPlayer.StarterPlayerScripts.Token_Debug.Iris', Line 86  -  Studio - Iris:86
  21:58:57.629  Stack End  -  Studio

Iris Inputs not working in plugins

Post from xswezan on the Roblox OSS Discord Community:

I noticed that using Iris in a plugin widget wasn't possible, so I forked Iris and added this functionality (partially). I added 4 new settings to the config; CustomInputBeganEvent, CustomInputChangedEvent, CustomInputEndedEvent, CustomMousePositionCallback.

I wouldn't say it's the best fix to this problem and I mainly did this to test. It's a bit hacky to do this but it works.

You have to apply the custom events in the config BEFORE you call .Init, which is the biggest problem here

local Iris = require(script:WaitForChild("Iris"))
Iris.UpdateGlobalConfig{
    UseScreenGUIs = false;
    
    CustomMousePositionCallback = function()
        return ViewportWidget:GetRelativeMousePosition()
    end;
    CustomInputBeganEvent = EventLayer.InputBegan;
    CustomInputChangedEvent = EventLayer.InputChanged;
    CustomInputEndedEvent = EventLayer.InputEnded;

}
Iris = Iris.Init(ViewportWidget)

Still works though ๐Ÿคทโ€โ™‚๏ธ
Gyazo Screen Video
I'd like to make a pull request out of this, but I don't think it's really that well made yet to go in the actual build, it's mainly a proof of concept

Iris 2.1.3 on wally is broken/incomplete

The 2.1.3 version on Wally is broken.
To get the module to work I had to specify the version with Iris = "michael-48/iris@=2.1.1" (since it's the version of the latest github release, I skipped 2.1.2)

This is not good at all since by default Wally will auto-update packages to the latest bug fix version (indicated by the last number of the version), so all wally installations will default to this broken version.
I recommend just uploading a fixed package as 2.1.4.

Here's the contents of this version:
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.