njpaul / azure-devops-ordered-dropdown

A dropdown control for Azure DevOps work item forms that lets you control the order of items in the list
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

Cannot delete from custom control #1

Open amadard opened 1 year ago

amadard commented 1 year ago

When using the custom control, it does not perform as expected when clicking the backspace key. The DevOps default dropdown control will allow individual characters to be deleted as well as the entire value of the field. The extension control does not acknowledge any deletion.

Will you please update the custom control to allow deletes to be performed in the same manner as the DevOps default dropdown control?

njpaul commented 1 year ago

Thank you for the bug report. Feedback like this is so much better than when people uninstall the extension claiming it doesn't work, but don't say why it failed to meet their expectations.

I will look into this as soon as time allows, hopefully in the next week or so.

When using the default control, do you intend for users to enter their own values, in addition to the predefined ones?

amadard commented 1 year ago

When using the default control, do you intend for users to enter their own values, in addition to the predefined ones?

No, just intend for them to use the predefined values. The normal control will show a validation error while deleting characters:

The field 'XXX' contains the value 'delet' that is not in the list of supported values.

The custom control also does not allow typing in a predefined value, it must be selected. Not as big of a concern as the inability to clear the values from the custom control by deleting the entered value.

njpaul commented 1 year ago

Ok, thanks for the additional info

amadard commented 1 year ago

Happy New Year! Following up on this, do you have an ETA for the release?

njpaul commented 1 year ago

Hi @amadard, happy new year to you as well.

No surprise, but I didn't have any time over the holidays to pick this back up. But thanks to your prompt, I'm spinning my development environment back up tonight, in the hopes I can make some progress on this oven the weekend. Thanks for your patience and continued interest.

amadard commented 1 year ago

Following up on this, have you been able to investigate the issue? Any questions?

njpaul commented 1 year ago

Sorry for not responding sooner. I've been out of town on business. I hope to have this completed this weekend.

njpaul commented 1 year ago

This could get a little more complicated that I thought. The original design didn't work well for also having typing abilities. The azure-devops-ui library's EditableDropdown component seems to have a bug where the text of the input can end up not correctly matching the selected value. This happens when the backing field changes, as is the case when changes are reverted on the form. Azure DevOps doesn't have this problem because they seem to have rolled their own inputs, possibly based on Fluent UI.

So I ended up switching to Fluent UI and rewriting a large part of the extension. I've got something fairly close to the built-in control. I haven't adjusted any of the styling yet, but the bigger issue is that there isn't an easy way to expand/contract the extension's height when the menu is visible.

I'm going to need to play around with it a bit more to see if I can find a workable solution. Worst case is I'll have to write the components from scratch. That may not be a bad thing to do anyways.

njpaul commented 1 year ago

I was able to solve the resizing functionality and have a preview release available that you can try out. I still haven't done any styling on the control itself yet.

You can get it by downloading the pre-release. It has a different ID and name (both have "preview" in them), so it'll appear as a different extension and won't interfere with your existing installation.

amadard commented 1 year ago

How do I install the pre-release? I've only ever installed from the marketplace, and nothing is jumping out at me in the DevOps settings.

njpaul commented 1 year ago

Ah, maybe you can only upload extensions if you use Azure DevOps Server. That's primarily what I use. I'm still new to the Services version.

If you're comfortable with sharing your organization name, I can share the extension with you through the marketplace. But if you can wait until later today, I'll re-publish the preview version as public and you'll be able to find it in the marketplace.

On Mon, Mar 6, 2023, 09:44 amadard @.***> wrote:

How do I install the pre-release? I've only ever installed from the marketplace, and nothing is jumping out at me in the DevOps settings.

— Reply to this email directly, view it on GitHub https://github.com/njpaul/azure-devops-ordered-dropdown/issues/1#issuecomment-1456377325, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC4OXOKTNSMCND4SGXYCTL3W2YA6RANCNFSM6AAAAAAS4EPM3I . You are receiving this because you commented.Message ID: @.***>

amadard commented 1 year ago

This afternoon is totally fine by me, not a huge rush!

njpaul commented 1 year ago

It's now public on the marketplace.

https://marketplace.visualstudio.com/items?itemName=njpaul.ordered-dropdown-preview

amadard commented 1 year ago

Typing and deleting characters works!

The parts not working as expected that I see right now are: Field Label is not present, color scheme doesn't match UI (white box when in Dark Mode), list displays entire list and not cutting short with a scroll bar.

amadard commented 1 year ago

Correction, Field Label does show up, but I had to enter it into the Control Options. I expect that to default when the field is selected.

njpaul commented 1 year ago

Can you post a screenshot of the field label not showing up, and of the screen where you filled it in to get it to show up? The label is typically rendered by Azure DevOps, not by the extension itself, but I'll take a look.

The UI styling in dark mode is going to take a bit of research. It's one of the things that got lost when changing UI libraries. I'm hoping to be able to figure something out. I may end up switching UI libraries back and trying a few more things out.

I think limiting the height of the dropdown is relatively straightforward to implement.

But styling issues aside, is there anything preventing you from being able to use the extension?

I'm going to leave the preview extension available and keep updating it with the latest changes. I'll leave the original up as the "stable" version and update it once the remaining issues are solved. I'm not sure if the marketplace lets me publish a preview version and stable version at the same time, letting users choose which one to download.

On Mon, Mar 6, 2023, 17:11 amadard @.***> wrote:

Correction, Field Label does show up, but I had to enter it into the Control Options. I expect that to default when the field is selected.

— Reply to this email directly, view it on GitHub https://github.com/njpaul/azure-devops-ordered-dropdown/issues/1#issuecomment-1457190918, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC4OXOJQSTGSKQIGCVMDB4LW2ZVLFANCNFSM6AAAAAAS4EPM3I . You are receiving this because you commented.Message ID: @.***>

amadard commented 1 year ago

Below is a picture of all of the pertinent pieces. First is the control editor where the Label entry, blank after I selected a field. Second is the Process editor without a label entered, third is a work item without the label entered. Fourth is the process editor with a label, last is a work item with the label entered.

I tested with the original extension, it too did not auto-enter the label, so that is not a new behavior for the extension.

The height and styling issues will prevent us from using the updated extension, those are more disruptive to my end users than the inability to delete characters. The core functionality of the extension is working as desired, with the ordered list and the ability to type/delete in the field.

image