Skip to content

add three tabs#650

Merged
GergiH merged 6 commits intodevelopfrom
feature/multiple-tabs
Apr 7, 2020
Merged

add three tabs#650
GergiH merged 6 commits intodevelopfrom
feature/multiple-tabs

Conversation

@geohacker
Copy link
Copy Markdown
Collaborator

Addresses IFRCGo/go-frontend#1009

Changes

  • Adds 3 tab titles for Events
  • One is by default 'Additional Information' but editable
  • Snippets now take a tab number - 1, 2 or 3. This is sent in the API so the front-end can render them into different tabs.

Screenshot 2020-03-31 17 34 54

Screenshot 2020-03-31 17 34 41

/event/:id

name: "Test Tabs"
dtype: 66
...
id: 3570
slug: "test-the-slug-1"
tab_one_title: "Additional Information"
tab_two_title: "Maps and Charts"
tab_three_title: "Guidance"

/event_snippets

results: [,…]
0: {event: 3570, snippet: "Content for Tab 1", image: null, visibility: 3, position: 3, tab: 1, id: 134}
1: {event: 3570, snippet: "Content for Tab 2", image: null, visibility: 3, position: 3, tab: 2, id: 135}
2: {event: 3570, snippet: "Content for Tab 3", image: null, visibility: 3, position: 3, tab: 3, id: 136}

Checklist

Things that should succeed before merging.

  • Updated/ran unit tests
  • Updated CHANGELOG.md

Release

If there is a version update, make sure to tag the repository with the latest version.

cc @necoline @batpad @GregoryHorvath

@necoline
Copy link
Copy Markdown

This structure makes sense to me

@geohacker geohacker changed the title add three tabs, set one by default. allow snippets to be assigned to … add three tabs Mar 31, 2020
@geohacker geohacker requested a review from GergiH April 3, 2020 12:21
@geohacker
Copy link
Copy Markdown
Collaborator Author

@GregoryHorvath do you mind giving this a quick review + merge?

@geohacker geohacker force-pushed the feature/multiple-tabs branch from a8b49bb to e653761 Compare April 3, 2020 12:24
@geohacker
Copy link
Copy Markdown
Collaborator Author

Would be great to get it up on staging as well. Thank you @GregoryHorvath!

@batpad
Copy link
Copy Markdown
Collaborator

batpad commented Apr 3, 2020

@geohacker we'd need to check up on failing tests here :(

@GergiH
Copy link
Copy Markdown
Collaborator

GergiH commented Apr 3, 2020

@geohacker we'd need to check up on failing tests here :(

It seems the migrations conflict. Just run docker-compose run --rm makemigrations_merge and they should be fixed if everything goes right.

@geohacker
Copy link
Copy Markdown
Collaborator Author

Ok cool I can do that. Wasn't sure the best approach with migrations!

@geohacker
Copy link
Copy Markdown
Collaborator Author

@GregoryHorvath @batpad thank you, I just merged the migrations and tests pass. 👍

@geohacker
Copy link
Copy Markdown
Collaborator Author

Ping @GregoryHorvath @batpad

@GergiH
Copy link
Copy Markdown
Collaborator

GergiH commented Apr 7, 2020

@geohacker So sorry I was about to deploy this but got distracted and forgot about it since. Merging it and deploying it soon.

@GergiH GergiH merged commit 29e032e into develop Apr 7, 2020
@thenav56 thenav56 deleted the feature/multiple-tabs branch June 2, 2020 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants