Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Refactoring Buttons #183

Merged
merged 6 commits into from
Mar 15, 2023
Merged

feat: Refactoring Buttons #183

merged 6 commits into from
Mar 15, 2023

Conversation

nick22985
Copy link
Collaborator

@nick22985 nick22985 commented Mar 4, 2023

#165
#158
#176

  • Buttons refactored and changes / tested
  • Add validation for labels and url and that in the buttons itself discord doesnt allow these to be an empty string if. Will crash if it is
  • Reconfigure how the button config works use objects instead
  • Update descriptions to make it more readable. Change the names of config options if needed
  • Add deperacted to the old settings. Explain were to put the new options Invalid

@nick22985 nick22985 marked this pull request as draft March 4, 2023 10:29
@nick22985 nick22985 changed the title feat: #165 Refactoring Buttons feat: Refactoring Buttons Mar 4, 2023
@xhayper xhayper self-assigned this Mar 6, 2023
@xhayper xhayper added the enhancement New feature or request label Mar 6, 2023
@nick22985
Copy link
Collaborator Author

nick22985 commented Mar 13, 2023

Full Config for buttons in JSON settings

"vscord.status.buttons": {
	"button1": {
		"enabled": true,
		"active": {
			"label": "Check Out My Github",
			"url": "https://github.com/nick22985",
			"enabled": true
		},
		"idle": {
			"label": "Check Out My Github",
			"url": "https://github.com/nick22985",
			"enabled": true
		},
		"inactive": {
			"label": "Check Out My Github",
			"url": "https://github.com/nick22985",
			"enabled": true
		},
		"git": {
			"enabled": true,
			"idle": {
				"label": " View Repository ",
				"url": "{git_url}",
				"enabled": true
			},
			"active": {
				"label": "View Repository",
				"url": "{git_url}",
				"enabled": true
			},
			"inactive": {
				"label": "View Repository",
				"url": "{git_url}",
				"enabled": true
			}
		}
	},
	"button2": {
		"enabled": true,
		"active": {
			"label": "Check Out My Website",
			"url": "https://nick22985.com",
			"enabled": true
		},
		"idle": {
			"label": "Check Out My Website",
			"url": "https://nick22985.com",
			"enabled": true
		},
		"inactive": {
			"label": "Check Out My Website",
			"url": "https://nick22985.com",
			"enabled": true
		},
		"git": {
			"enabled": true,
			"idle": {
				"label": "Check Out My Github",
				"url": "https://github.com/nick22985",
				"enabled": true
			},
			"active": {
				"label": "Check Out My Github",
				"url": "https://github.com/nick22985",
				"enabled": true
			},
			"inactive": {
				"label": "Check Out My Github",
				"url": "https://github.com/nick22985",
				"enabled": true
			}
		}
	}
},

@leonardssh
Copy link
Owner

🤩

Copy link
Collaborator Author

@nick22985 nick22985 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested! Let me know any feedback

The old config still works no need to add deprecated settings. If people want to switch they can. Think this is def the better experience for the user

Also depending on what happens here. I think there are a few things we could refactor or make cleaner so to speak.

@nick22985 nick22985 marked this pull request as ready for review March 13, 2023 16:00
@leonardssh leonardssh requested a review from xhayper March 15, 2023 08:53
@xhayper xhayper merged commit 102c3e0 into leonardssh:main Mar 15, 2023
@atakiya
Copy link

atakiya commented Mar 25, 2023

For anyone else stumbling over this PR and wondering why the supposedly new configuration does not work: 817fa07 was a revert

Edit: Nevermind, wow, I'm blind even with glasses 😂. I typoed vscord into vscode 5 times.
Although it still begs the question why that revert of the config validation was done - it's not recognized by vscode.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants