Page MenuHomePhabricator

(MS 2) Make the last condition removable as well
Closed, ResolvedPublic

Description

As a query builder I want to be able to remove the remaining query in order to quickly start over

Problem:
Currently, when only one condition is remaining, the delete button gets disabled which is inconsistent with the previous behavior. This can be confusing and also a hindrance when trying to remove a prior query.

Example:

mockups

image.png (662×1 px, 64 KB)

BDD
GIVEN a visual query with only one condition
WHEN clicking the trash can icon
THEN the condition is removed
AND the space of the condition is replaced with a place holder text

Acceptance criteria:

  • remove the disabled state of the trashcan (last condition can be deleted as well)
  • when no condition remains, a placeholder text becomes visible (see figma specs)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Charlie_WMDE renamed this task from Make the last condition removable as well to (MS 2) Make the last condition removable as well.Jan 14 2021, 5:10 PM
Charlie_WMDE moved this task from Incoming to Backlog on the Wikidata Query Builder board.

\o/
@Charlie_WMDE Please close if it's also good from your side.

@Ladsgroup looks good but all the spacing is 14px instead of 16px(dimension-layout-xsmall) for some reason. is that some firefox issue?

The style is:

.querybuilder__condition-placeholder {
	margin-block: $dimension-layout-xsmall;
	padding-block: $dimension-layout-xsmall;
}

Which in turn becomes 1em in the output. Normally it's 16px but I assume given that the font-size is .875em, the computed em value also changes to 14px. (16*.875=14)

I'm not good at frontend stuff but this from https://www.w3.org/Style/Examples/007/units.en.html so I might be wrong:

The em and ex units depend on the font and may be different for each element in the document. The em is simply the font size.

okay, that makes sense! thanks for looking into it. closing this ticket now \o/