Add empty states to references page #559
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Difference to the empty state on the textko page is that we do see the title displayed over the empty state message. We should align the designs with the textko page, but in my opinion keeping the title looks better. Therefore it is implemented like this here. I question that already on a slack thread but it got lost into nirvana.
Just double check the variables I am using for the v-if because I am not 100% sure if it is nice
selectedModQuotedContentXmlString
, which is computed fromselectedModQuotedContent
, which is itself computed from the propselectedModEId
and the refamendingNormDocument
which is created out of the propnormXml
. To be honest I got lost in the computed chain but that property seemed to be the right now. In order not to display the title "Verweise" of the right panel, I use the same v-if but for the whole section, in the same component.refs
array is empty. I think this is the right one. There is one side effect that when you delete one entry of the table, the empty state is displayed (since the in-memory XML is updated and does not contain any refs anymore). And you need to click on save so that the updated XML is persisted to the backend. If you forget to click on save, the ref will still be there. But IMO this was the behavior before already, you deleted the entry, disappeared from the table but you still needed to click on save. I think this needs further iteration by design.Regarding tests, I added: