Skip to content

Commit

Permalink
docs: add new errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jmesrje committed Feb 19, 2025
1 parent 7462f19 commit 98d10fe
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
./standalone.rbxm
package:
name: Package
name: Packages
runs-on: ubuntu-latest
needs: changelog
steps:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![build](https://img.shields.io/github/actions/workflow/status/lumin-org/ui/release.yml?style=plastic&logo=github&logoColor=FFFFFF&label=build)](https://github.com/lumin-org/ui/blob/main/.github/workflows/release.yml)
[![discord](https://img.shields.io/discord/1105688855375511642?logo=discord&logoColor=white&label=chat&color=4d3dff&style=plastic)](https://lumin-org.github.io/to/discord)

An unrivaled UI framework for Roblox.
A simple and declarative UI framework

## Prerequisites

Expand Down
17 changes: 12 additions & 5 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default defineConfig({

function nav(): DefaultTheme.NavItem[] {
return [
{ text: 'Guide', link: '/guide/instances' },
{ text: 'Guide', link: '/guide/installation' },
{ text: 'API', link: '/api/' },
{ text: 'Changelog', link: '/changelog' }
]
Expand Down Expand Up @@ -89,13 +89,20 @@ function guide(): DefaultTheme.SidebarItem[] {
},
{
text: 'Errors',
collapsed: false,
collapsed: true,
items: [
{ text: 'Not Animatable', link: 'errors#notanimatable' },
{ text: 'Invalid Damping', link: 'errors#springinvaliddamping' },
{ text: 'Invalid Speed', link: 'errors#springinvalidspeed' },
{ text: 'Not Animatable', link: 'errors#springnotanimatable' },
{ text: 'Invalid Type', link: 'errors#invalidtype' },
{ text: 'Invalid Class', link: 'errors#invalidclass' },
{ text: 'Invalid Prop or Event', link: 'errors#invalidproporevent' },
{ text: 'Cleanup Not Allowed', link: 'errors#cleanupnotallowed' },
{ text: 'Invalid Prop', link: 'errors#invalidprop' },
{ text: 'Invalid Event', link: 'errors#invalidevent' },
{ text: 'Cannot Clean', link: 'errors#cleanupcannotclean' },
{ text: 'ForEach Invalid Return', link: 'errors#foreachinvalidreturn' },
{ text: 'View Invalid Type', link: 'errors#viewinvalidtype' },
{ text: 'Invalid Key Type', link: 'errors#applyinvalidkeytype' },
{ text: 'Invalid Prop Type', link: 'errors#applyinvalidproptype' },
]
},
]
Expand Down
38 changes: 33 additions & 5 deletions docs/guide/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@

If you come across an error, you should be able to find it here. If not, [file an issue](https://github.com/lumin-org/ui/issues/new?template=broken-src.md) because it's unintentional.

## `NotAnimatable`
## `SpringInvalidDamping`

The spring has invalid damping, and must be greater than or equal to 0. Anything under this will produce unwanted effects.

## `SpringInvalidSpeed`

The spring has an invalid speed, and must be greater than or equal to 0. Anything under this will produce unwanted effects.

## `SpringNotAnimatable`

The object in the state you're trying to use with the spring is not animatable. The list of supported types is:

Expand All @@ -24,12 +32,32 @@ The type you are passing to a parameter of some sort is invalid.

## `InvalidClass`

The class you are trying to pass to `New` is not recognized by Roblox.
The class you are trying to pass to `New` is not recognized.

## `InvalidPropOrEvent`
## `InvalidProp`

The prop or event trying to be found does not exist on the object being indexed.
The prop trying to be found does not exist on the object being indexed.

## `CleanupNotAllowed`
## `InvalidEvent`

The event trying to be found does not exist on the object being indexed.

## `CleanupCannotClean`

Cleanup is not allowed on this type, and should be cleaned by other means.

## `ForEachInvalidReturn`

You can only return instances within a `ForEach` iterator.

## `ViewInvalidType`

You gave a `View` an invalid type. `Screen`, `Surface`, and `Billboard` are the only ones that are allowed.

## `ApplyInvalidKeyType`

If the key is not a number or string, it is automatically invalidated.

## `ApplyInvalidPropType`

You may only pass actions and instances without a named key.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ hero:
actions:
- theme: brand
text: Guides
link: /guide/instances.md
link: /guide/installation.md
- theme: alt
text: API Reference
link: /api/
Expand Down
2 changes: 1 addition & 1 deletion pesde.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "lumin/ui"
version = "0.4.2"
description = "An unrivaled UI framework for Roblox"
description = "A simple and declarative UI framework"
authors = ["jmesrje"]
repository = "https://github.com/lumin-org/ui"
license = "MIT"
Expand Down

0 comments on commit 98d10fe

Please sign in to comment.