Commit e4752bdf authored by Rajat Jain's avatar Rajat Jain

Text changes and UX fixes

UX fixes
parent b0cf40a4
...@@ -32,12 +32,16 @@ export default { ...@@ -32,12 +32,16 @@ export default {
}, },
computed: { computed: {
currentValue() { currentValue() {
/* When the URL contains the epic_iid, we'd get /*
* When the URL contains the epic_iid, we'd get: '123'
*/ */
if (isNumeric(this.value.data)) { if (isNumeric(this.value.data)) {
return parseInt(this.value.data, 10); return parseInt(this.value.data, 10);
} }
/*
* When the token is added in current session it'd be: 'Foo::&123'
*/
const id = this.value.data.split('::&')[1]; const id = this.value.data.split('::&')[1];
if (id) { if (id) {
...@@ -96,7 +100,7 @@ export default { ...@@ -96,7 +100,7 @@ export default {
}, DEBOUNCE_DELAY), }, DEBOUNCE_DELAY),
getEpicValue(epic) { getEpicValue(epic) {
return `"${epic.title}"::&${epic.iid}`; return `${epic.title}::&${epic.iid}`;
}, },
}, },
stripQuotes, stripQuotes,
......
...@@ -49,7 +49,7 @@ export const emptyStateWithFilters = s__( ...@@ -49,7 +49,7 @@ export const emptyStateWithFilters = s__(
); );
export const emptyStateWithEpicIidFiltered = s__( export const emptyStateWithEpicIidFiltered = s__(
'GroupRoadmap|Try adding a start or end date to your epics so that they will display in the roadmap.', 'GroupRoadmap|Try adding a start or due date to your epics so that they will display in the roadmap.',
); );
export const PRESET_DEFAULTS = { export const PRESET_DEFAULTS = {
......
...@@ -15101,7 +15101,7 @@ msgstr "" ...@@ -15101,7 +15101,7 @@ msgstr ""
msgid "GroupRoadmap|To widen your search, change or remove filters; from %{startDate} to %{endDate}." msgid "GroupRoadmap|To widen your search, change or remove filters; from %{startDate} to %{endDate}."
msgstr "" msgstr ""
msgid "GroupRoadmap|Try adding a start or end date to your epics so that they will display in the roadmap." msgid "GroupRoadmap|Try adding a start or due date to your epics so that they will display in the roadmap."
msgstr "" msgstr ""
msgid "GroupSAML|Active SAML Group Links (%{count})" msgid "GroupSAML|Active SAML Group Links (%{count})"
......
...@@ -71,7 +71,7 @@ describe('EpicToken', () => { ...@@ -71,7 +71,7 @@ describe('EpicToken', () => {
describe('currentValue', () => { describe('currentValue', () => {
it('returns numeric `iid` when have string as value', async () => { it('returns numeric `iid` when have string as value', async () => {
wrapper.setProps({ value: { data: `"${mockEpics[0].title}"::&${mockEpics[0].iid}` } }); wrapper.setProps({ value: { data: `${mockEpics[0].title}::&${mockEpics[0].iid}` } });
await wrapper.vm.$nextTick(); await wrapper.vm.$nextTick();
expect(wrapper.vm.currentValue).toBe(mockEpics[0].iid); expect(wrapper.vm.currentValue).toBe(mockEpics[0].iid);
...@@ -185,7 +185,7 @@ describe('EpicToken', () => { ...@@ -185,7 +185,7 @@ describe('EpicToken', () => {
const tokenSegments = wrapper.findAll(GlFilteredSearchTokenSegment); const tokenSegments = wrapper.findAll(GlFilteredSearchTokenSegment);
expect(tokenSegments).toHaveLength(3); expect(tokenSegments).toHaveLength(3);
expect(tokenSegments.at(2).text()).toBe(`"${mockEpics[0].title}"::&${mockEpics[0].iid}`); expect(tokenSegments.at(2).text()).toBe(`${mockEpics[0].title}::&${mockEpics[0].iid}`);
}); });
}); });
}); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment