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

Select Font size doesn't match other form elements (when used in card header)

Open howudodat opened this issue 2 years ago • 2 comments

Describe the bug The font size of a selected item isn't the same as other form elements when it is placed in the header of a card

To Reproduce Steps to reproduce the behavior:

	public void onModuleLoad() {
		Select<String> cmbType = Select.create();
		cmbType.appendChild(SelectOption.create("Test", "Test"));
		cmbType.selectAt(0);

		Select<String> cmbType2 = Select.create();
		cmbType2.appendChild(SelectOption.create("Test", "Test"));
		cmbType2.selectAt(0);

		Row row = Row.create();
		row.appendChild(Column.span3().appendChild(cmbType));
		row.appendChild(Column.span3().appendChild(new TextBox("Prefix")));
		row.appendChild(Column.span3().appendChild(new DateBox("Date")));

		Row row2 = Row.create();
		row2.appendChild(Column.span3().appendChild(cmbType2));
		row2.appendChild(Column.span3().appendChild(new TextBox("Prefix")));
		row2.appendChild(Column.span3().appendChild(new DateBox("Date")));

		Card crdCanvas = new Card();
		crdCanvas.setTitle("Test Card");
		crdCanvas.getHeaderTitle().clearElement().appendChild(row);
		
		crdCanvas.appendChild(row2);

		Layout app = Layout.create("Test Mobile");
		app.show(ColorScheme.BLUE);
		app.setContent(crdCanvas);
		
	}

Expected behavior Font should be the same as other form elemebts

Screenshots image

Desktop (please complete the following information):

  • OS: ubuntu
  • Browser Chrome and FF

Smartphone (please complete the following information):

  • Not tested on a phone

howudodat avatar Jan 07 '23 15:01 howudodat

ok so the reason why is this: private final DominoElement<HTMLHeadingElement> headerTitle = DominoElement.of(h(2));

howudodat avatar Jan 12 '23 16:01 howudodat

just a thought. I have noticed that almost all variables are private. This makes it almost impossible to extend the classes. making the variables protected would allow an extended class, where I create headerTitle as I want it, then allow the base class to continue it's creating of the card.

howudodat avatar Jan 12 '23 16:01 howudodat

Fixed in version 2.x.x

vegegoku avatar Nov 12 '24 13:11 vegegoku