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

ChannelForm: Show message intead of stacktrace when no channel type found #290

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sukhwinder33445
Copy link
Contributor

fixes #225

@sukhwinder33445 sukhwinder33445 added the bug Something isn't working label Jan 30, 2025
@sukhwinder33445 sukhwinder33445 self-assigned this Jan 30, 2025
@cla-bot cla-bot bot added the cla/signed CLA is signed by all contributors of a PR label Jan 30, 2025
@ncosta-ic
Copy link
Member

@sukhwinder33445 I feel like it looks kinda weird with the current implementation, as it still shows the name input, even though there's no submit button or the like.

What if you moved the result check to the top of the assemble method? I think this would correlate with our philosophy of having early breakouts if required data is not provided to a method.

It currently looks like this:
image

And adding the check and early return to the top of the method would result in this representation:
image

The displayed message is also missing a dot (.) at the end of the second sentence.

Keep in mind that I only wondered about the reasoning for this exact implementation, this isn't really a suggestion. But if you do feel like it would improve the UI, feel free to change it. Will do a proper review after your comment on this topic :)

@nilmerg
Copy link
Member

nilmerg commented Feb 25, 2025

Our actual philosophy on this topic is not allowing access to a form at all. i.e. to disable the button that leads to it and adding a title to explain why.

…el type found

ChannelForm: Throw exception in case user access the form via url
@sukhwinder33445 sukhwinder33445 force-pushed the fix/channel-config-stacktrace branch from 6152779 to c7e057e Compare February 25, 2025 10:28
@nilmerg
Copy link
Member

nilmerg commented Feb 25, 2025

…or to hide the button but still explain why if there is no contextual hint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cla/signed CLA is signed by all contributors of a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Module Channel Configuration: No Available Channels results in Stack Trace for Add Channel
3 participants