Code Monkey home page Code Monkey logo

ellyb's People

Contributors

ellypse avatar meorawr avatar solanya avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ellyb's Issues

Serialization module

Total RP 3 and Extended uses table serialization to export some data that the user can then copy and paste, and in Storyline we will also have an export in the future so people can send us their 3D model scaling values.

The serialization code from Total RP 3 should be moved into Ellyb and improved. We will use base64 format when outputting a string to avoid issues with special characters (quotes, brackets, etc.) being modified when the text is pasted into some programs, resulting in a corruption of the data. Base64 will only output letters and numbers, which will remain intact.

For backward compatibility, the un-serialization should be able to handle both base64 and non-base64 encoded serializations.

Secure library via metatables?

We might want to secure the library to prevent from overriding functions from within add-ons using the library (especially since two add-ons can use the same instance of the library).

I will probably want to add a way to extend the library somehow though, and not just lock it down entirely.

Integrated Twitter-based bug reporting tool

I'm putting this here, but I am not a 100% sure if this live inside Ellyb or in a separated project.

The idea here is to have an in-game bug reporting tool (like a lib, usable by multiple add-ons) that will use the game's Twitter integration to send errors as screenshots to a specified Twitter account. The user can add a message of his own (not limited by Twitter's characters limitation), include one or more screenshots and one or more errors stack trace. The whole thing would be pieced together in one or more tweets to be sent with screenshots as attachments.

image

The library will register itself as an error handler and will allow other add-ons to register themselves, providing a Twitter account that will receive the reports. When an error happens, a message appears in the chat frame to suggest sending a bug report.

image

To make stack trace sendable, screenshots would be generated using a fullscreen frame that will show the stack trace and every information needed. Basically, to circumvent Twitter's limitation, every text that needs to be sent will be screenshotted first and then sent.
The add-ons could also provide data that should be attached to every bug report (version numbers, usage statistics, etc.).

We could imagine then having automation and OCR tools that would automatically read the screenshots and create tickets on GitHub ๐Ÿค”

Reverse lookup for localization

It would be really interesting to have some kind of /framestack feature for the localizations. Type a command to enter a mode where having the cursor over a UI element will look for the localization keys in the localization table and display that key in the tooltip. It would make it easier for translators to know where to find a text in the localization tools (CurseForge).

Error when quick importing using TRP3 dev version

1x totalRP3\libs\Ellyb\Assertions.lua:49: bad argument #2 to 'format' (string expected, got nil)
[C]: ?
totalRP3\libs\Ellyb\Assertions.lua:49: in function 'isType'
totalRP3\libs\Ellyb\GameEvents.lua:55: in function 'unregisterHandler'
totalRP3_Extended\quest\campaign.lua:62: in function <totalRP3_Extended\quest\campaign.lua:58>
totalRP3_Extended\quest\campaign.lua:220: in function 'handler'
totalRP3\core\impl\events.lua:110: in function 'fireEvent'
totalRP3_Extended\main.lua:205: in function 'removeObject'
totalRP3_Extended_Tools\list/list.lua:712: in function <totalRP3_Extended_Tools\list/list.lua:710>
totalRP3_Extended_Tools\list/list.lua:741: in function 'checkVersion'
totalRP3_Extended_Tools\list/list.lua:750: in function <totalRP3_Extended_Tools\list/list.lua:703>
totalRP3_Extended_Tools\list/list.lua:774: in function <totalRP3_Extended_Tools\list/list.lua:773>

Locals:
(*temporary) = "Invalid variable type "%2$s" for variable "%1$s", expected "%3$s"."
(*temporary) = nil
(*temporary) = "string"
(*temporary) = "handlerID"
(*temporary) = "string expected, got nil"

No issue with TRP3 1.2.11.3.

(Same issue happened when I tried to start a campaign, seems like a lot of Extended events aren't working with the dev version)

Shared user settings

Idea: Ellyb should hold its own settings, shared across all add-ons using Ellyb. The kind of settings that could be saved would be general, always true stuff, like language, date format and probably more.

Since SavedVariables are stored in each individual add-ons that kind of system would need to: reconcile the settings to use the latest up to date ones, and also propagate them to every add-on SaveVar (as we might disable one of them at any time, they all need to have the settings).

We will probably need a custom events module (like the game events one) to fire updates to all instances of Ellyb, but also make sure we only use one main instance (:GetMostUpToDateVersion) while keeping all instances as listeners.

Textures manager

I would like an abstraction layer to handle textures (especially icons, but not limited to them), to make it easy to use a texture using an ID or a path. This module would be especially useful in Total RP 3, see https://github.com/Ellypse/Total-RP-3/issues/76

A TexturesManager would have a mapping table of path <-> ID, but since the list would have to be maintained manually the system should handle the cases when this mapping is incomplete.
Textures will have :

  • texture path or texture ID
  • coordinates to crop individual icons located inside sprites (like this one)
  • categories (tags)
  • have helper methods to apply the texture to a button, output as an escape sequence and maybe more.

A texture should only exist one (to limit the impact on memory). The textures manage would be pre-populated with known icons, which would offer IDE completion, and keep track of new textures. Textures should be accessed via the manager so it can check if it already has it in its database.

Bug: Trying to resolve a Promise that has already been resolved

9x ...terface\Storyline\lib\Ellyb\Tools\Promise.lua:81: Trying to resolve a Promise that has already been resolved.
[C]:: in function 'error'
...terface\Storyline\lib\Ellyb\Tools\Promise.lua:81: in function 'Resolve'
...erface\Storyline\lib\Ellyb\Tools\Promises.lua:40: in function 'callback'
...terface\Storyline\lib\Ellyb\Tools\Promise.lua:53: in function 'Success'
...erface\Storyline\lib\Ellyb\Tools\Promises.lua:29: in function 'all'
Storyline\logic.lua:233: in function <Storyline\logic.lua:192>
Storyline\events.lua:827: in function <Storyline\events.lua:825>

Animations module

I want to have an animations module in Ellyb. Animating stuff in WoW's UI is hard and a huge pain in the butt. The idea here is to have easy to use functions to make elements animable, with basic default animations, some neat built-in principles like cascading.

  • Define a bunch of standard animations (fade in, pop in, slide down, shake) available as constants to pass to other functions. If I can find a way to transpose more advanced animation bezier curves for timings (bounce, elastic) it would be super awesome.
  • Have functions to call, passing a frame, to animate an element using the given animation object. Be able to provide a callback to execute when the animation is over (use promise?).
  • Helpers functions for animations: loop, reverse, cascade (give a table of elements, a delay for each, and animate them one after the other)
  • Have standard interactions hooks: on click (animate once), on mouseover (apply the transformation on enter, remove on leave)
  • Optional UI sounds

Example of what I see the usage be

-- Animate myFrame right away
Ellyb.Animations.animate(myFrame, Ellyb.Animations.SLIDE_IN, Ellyb.Animations.ORIGINS.TOP)

-- Fade in overlayTexture when the cursor is over myMouseOveredButton
Ellyb.Animations.animateOnMouseOver(myMouseOveredButton, Ellyb.Animations.FADE_IN, overlayTexture)

-- Pop in each line in listLines, calling the given callback when the animation is done (for each individual one)
Ellyb.Animations.animateCascade(listLines, Ellyb.Animations.POP_IN, function(listLine)
  mapMarker:DoSomething()
)

-- Slide out myFrame from the left to right during 1.5 seconds using an elastic timing
Ellyb.Animations.slideOut(myFrame, Ellyb.Animations.DIRECTIONS.RIGHT, 1500, Ellyb.Animations.EASINGS.ELASTIC)

Class system is fundamentally borked in latest versions

There's no issue tracker present on the middleclass submodule so I'll stick it here.

The recent changes to the middleclass code to overcomplicate things have a rather fundamental bug whereby assignments to fields on instances are actually clobbering the fields on every instance of a class.

https://github.com/Ellypse/middleclass/blob/11be513a322af34fb76460e00e4cd8f5f7c5ff61/middleclass.lua#L144

The issue in particular is that class instances have their metatable set to class.__instancedict (dict in the linked function) which has a __newindex function that, after the check for protectedness, assign the key/value to a proxy table that is shared among all instances of the class.

The following example will trigger the fault.

local MyClass = AddOn_Lib_Middleclass("MyClass");

local instance_a = MyClass();
local instance_b = MyClass();

instance_a.my_field = "My String";
instance_b.my_field = "My Other String";

assert(instance_a.my_field ~= instance_b.my_field, "Both fields have the same value!!?!?!?");

Unit:IsMountable() error on Classic client

The classic client is missing the API functions called by Unit:IsMountable() as there were no mountable unit back then.

Expected result:
Unit:IsMountable() should not error but instead return false on Classic clients.

Search input mixin

We would want a Mixin to use for search input that would automatically hook key presses and if Ctrl-F is pressed then focus the search input.

We probably need to account for multiple search fields being displayed and test if the parent is the topmost frame.

Color constructor is too smart

One issue with the design of the Color class is the constructor attempts to be too clever with the given values, accepting 0-1, 1-255, and hex inputs.

This isn't too bad, it's great for 99.9% of scenarios, but it does lead to subtle bugs where for example if the user has a custom color picker addon and they select an RGB value of (1, 1, 1) it'll get parsed as being fully white rather than mostly-black.

One such case where you'd run into this is actually the custom psycho trait colors in TRP3 - I've got ColorPickerPlus installed so if I use the default picker I can use the R/G/B input fields it provides. Setting them all to 1 would make the bar white, not black.

I think it'd be better to have some static constructors on the class (Color:fromRGBA, Color:fromRGBAAsBytes) to explicitly control what type of data range you're passing in when constructing the object. Thoughts?

Transitionators optimisation

Unset onUpdate script when table is empty, add to table when running instead of using a bool. Should remove empty onUpdates calls.

[8.0] Deferred XML Node object named ... already exists

Known issue but just so it isn't forgotten, using Total RP 3 & Storyline together brings multiple errors from Ellyb on load : Deferred XML Node object named ... already exists

List of XML objects : Ellyb_LogsFrame, Ellyb_CursorFrameTemplate, Ellyb_ChatInputTextures, Ellyb_PopupButton, Ellyb_PopupButton_Okay, Ellyb_StaticPopTemplate

Date/time module

I want Ellyb to have a date/time module to easily format and do operations on dates and hours. The main goal is to format the time correctly according to the user localization.

It would probably be a good thing to look for a library that already does something similar and integrate it.

Dropdowns

Dropdowns are a pain in the butt to handle in WoW. Using Blizzard's dropdown functions creates taint, and third party libraries are either not updated (PlaySound() issue in 7.3) or buggy (doesn't close dropdown when parent gets hidden).

I want Ellyb to have its own full featured Dropdown component.

Some of the key aspect:

  • Resembles the default UI dropdowns in UI and usage
  • Use all custom frames and functions to avoid taint
  • Use UI sounds correctly
  • Gets hidden when parent is hidden
  • Allow category/parts inside the dropdown (example of multi-parts dropdown: list of Total RP 3 profile: favorites, full list, actions).
  • Allow setting a max height for the entire dropdown or per category. If content goes over the height, it should scroll inside the dropdown.
  • Lines can display a tooltip on hover.
  • Lines can be text, or more advanced component (checkboxes, actions with buttons, submenus)

Purple in ColorManager is pink

While working on the color picker, I saw the Purple color in the ColorManager is magenta which is closer to pink. Purple should probably be (0.5, 0, 1).

very urgent pls fix

Animated warning alert frame

I want to make a UI Widget for warnings and alerts that shows a text in a red-ish frame that is animated and catch the eye. This would be used in places where some text has to catch the user's eye, but in a tasteful way, using glowing effects, maybe sound, animations when coming into view.

Editbox with edits history

Provide an Editbox function to make a specific editbox keep track of its edits and allow the user to navigate through the edits using Ctrl-Z to go backward and Ctrl-Shift-Z to go forward.

  • Probably have a debounce mechanism so we don't save per single character edits but only a complete edit of words.
  • Save the edits in a table and navigate the table index using the keyboard keys.

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.