jquery-ui icon indicating copy to clipboard operation
jquery-ui copied to clipboard

Dialog: Add option to set the html element for the dialog title

Open rpkoller opened this issue 1 year ago • 8 comments

PR for https://github.com/jquery/jquery-ui/issues/2271. Initial draft adding an option based on the naming @mgol suggested on the issue (uiDialogTitleTagName ) and using span as the default. Currently working on adding tests as well in the next step.

rpkoller avatar Jul 31 '24 20:07 rpkoller

Ok i've finished an initial draft. I am not sure if the multiline syntax and formatting i've used is correct but i had to satisfy the linter and get to a line length < 100 characters. and i've also added a test. i've created a modal dialog and set the desired tag name to h2. i've picked an html tag != the default value span. I then used the queryselector to pick the title element which has the class name of .ui-dialog-title and with the tagName property i've checked if that element is the given h2. and i thought it is unnecessary to check several different scenarios like for the aria-modal test. i thought a single one should be enough here i hope?

rpkoller avatar Aug 01 '24 02:08 rpkoller

The good thing, the test works (the expected value is an h2 but the actual value is still a span). so my fix for the line length linting error isn't working (as a one liner it works locally).

rpkoller avatar Aug 01 '24 02:08 rpkoller

Got the test to green with the help of @rocketeerbkw. the only thing we were not sure if it was necessary to add the new option to the common-deprecated.js file as well.

rpkoller avatar Aug 02 '24 01:08 rpkoller

so you mean creating a pull request for api.jqueryui..com including the note about the initial release in 1.14.1? i can create that initial draft over there.

And do i need to create an issue in the api.jqueryui.com issue queue first or would it be ok to directly open a pull request there? cuz on the jqueryui repo ive also had to use the issue number of the issue for the branch. for this issue here the branch is called for example 2271-add-option-uidialogtitle-html-element.

rpkoller avatar Aug 06 '24 00:08 rpkoller

Just a PR will be fine. We can have it reference the corresponding UI issue + PR in the commit message.

mgol avatar Aug 06 '24 00:08 mgol

oki, and should i omit using an issue number in the branch name?

rpkoller avatar Aug 06 '24 00:08 rpkoller

The branch name doesn’t matter, you can use whatever is convenient for you.

mgol avatar Aug 06 '24 01:08 mgol

@fnagel can you review as well?

mgol avatar Aug 23 '24 16:08 mgol

Thanks, merged! The change will arrive in jQuery UI 1.14.1.

mgol avatar Sep 09 '24 15:09 mgol

Thank you! and one question do you already have a rough plan when you want to release 1.14.1? i ask if there is a slight chance it might be released before the first beta for the next minor release drupal (11.1) arrives , which is planned for november 11th?

rpkoller avatar Sep 09 '24 16:09 rpkoller

@rpkoller yeah, a release in October is likely if nothing critical comes out and the milestone (https://github.com/jquery/jquery-ui/milestone/8) is clean; currently, there's one issue to fix there, but it's simple.

mgol avatar Sep 09 '24 16:09 mgol

that would be perfect, thank you for the headsup!

rpkoller avatar Sep 09 '24 16:09 rpkoller

@rpkoller jQuery UI 1.14.1 with this change has been released.

mgol avatar Oct 30 '24 17:10 mgol