-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DotCoop – Misc] Support the configuration of which tab is selected on map startup. #231
Comments
Might be worth addressing while fixing #226 |
@wu-lee Please could you review my code for this? It's in https://github.com/DigitalCommons/mykomap/tree/231-default-sidebar-tab I've tested locally the things in the acceptance criteria by checking out https://github.com/DigitalCommons/owned-by-oxford-project/tree/public/dev in To do those actual tests for DotCoop and ICA, do I just need to do the same thing but with those respective repos checked out in Once the feature is ready to be applied, I'd also like to have a call about your process of rebasing the branch. |
Also I've noticed that some of the line breaks have changed due to my Prettier code formatter. Since more of us are going to be working on this, I'd be in favour of all of us using Prettier with the same default config, so that styling doesn't become inconsistent. This might cause a lot of changes for a short while, which makes looking at diffs a bit annoying, but I think it will be worth it in the long run - what do you think? |
Oh, and should I be adding a unit test (or any other type of test) for this? If so, where should it go? And are there any docs yet to describe our testing setup, and how we should be adding tests? I couldn't find any |
Yes, that's how I do it. Although: I check out the map projects in directories adjacent to the mykomap working directory, and use a symlink. I think you're on OS X so this solution should work for you. On Windows, for various reasons on top of this one, I'd recommend developing using Windows System for Linux. This isn't a commonly used platform for development, even then.
Yep. |
I'm not absolutely against this idea in theory, but - yikes! - I am baulking a bit at reformatting the entire project (and presumably all the other projects?) to support Prettier, which isn't something new to me and to all DCC development to date (i.e. not just me and not just this project). And especially doing that as part of this issue. (I'm not saying you're suggesting that, BTW, but it does seem to be a logical consequence if we did adopt it.) I don't use VS Code for development, I use Emacs - so I'm wondering if I even can use Prettier. Investigating... yes, it's a stand-alone NodeJS tool, and it does seem to have support for Emacs, which is a relief, as otherwise it might be a step backwards for me. Next, I was wondering how hard it would be to just tell Prettier to follow the current style in the repo.... (Which isn't totally consistent, but that's partly because of the chequered history, and my slight reluctance to make big whitespace changes like this unless I really have to.) ...However, reading the Prettier docs it says:
So ok: it it sounds like that's not an option. In fact that sounds a bit like Douglas Crockford's JS linter, which when I did try using, found unpleasant and inconvenient in practice exactly because if it's "opinionated and inflexible by design" design. It made me jump through hoops I didn't really feel were very helpful, and typically at times I didn't want to have to tell it to shut up and go away, and ultimately I concluded the simplest things was just to uninstall the little ****er. So finally, I am wondering if this claim that our lives would be better with Prettier is actually valid. But, even conceding that Prettier's vision that it adds productivity by silencing sources of dissent in a sane way to apply across the board on new projects... this would still imposes a great big multi-repo alteration which could scupper git-blame's ease of application from there on. Being able to use git-blame is itself a very useful tool for extracting information from the commit history. So I'm not yet convinced that vision offers a compelling benefit over using a formatter which can adopt a formatting style which matches, or closely matches, the one in the code already? |
Tests would go in the Thing is, I'm not sure if I found a way to test the config very simply.
Open to ideas.
No, the testing that's here is a bit tentative, and added in a period when I was the only developer. I should write something. |
Can we move this discussion to element? |
Ditto. |
(BTW I'm fine if you want to make this a pull-request - although it is essentially one commit ATM, it gives me somewhere to put the review comments.) On a basic scan with "ignore whitespace" enabled, which removes some of the Prettier churn, it still a bit hard to find the bits which are not churn, because of all the quote-switching and line-rewrapping.
Note, this is all just from eyeballing - I've not yet had time to test this builds and does what it says, will defer that until tomorrow. |
@wu-lee I've made a PR and addressed those comments #236
|
Where can I test this feature? @rogup |
@ColmDC what's the process for making features available for testing, and are there docs for this? I can add them if so The way I tested it was to checkout |
@wu-lee might need to assist here. But from my perspective I need to be able to evaluate it on
https://dev.maps.coop/dotcoop/
|
But if we want to move to alingning our processes, @lin-d-hop might prefer a different approach, like bundling a few more features before creating a new release? |
What I used to do was to use hook-runner to deploy mykomap in "test mode" on https://dev.maps.coop/temp/ Currently there are hook-runner targets for testing Mykomap with the Co-ops UK map (config: coopsuk_testing.json) and the ObO map (config obo-public_testing.json). These are configured to deploy here:
The use of What these targets do is redeploy the To do the ICA would need adding a new hook-runner target which tests Mykomap using that map project. Alternatively you could add the option you're testing to one of the existing map projects (maybe ObO?) It'd need to be on the And then you reset the Hope that makes sense! If not I can try and explain better. |
Note, this is all done on dev-1, which can't use the dev.maps.coop as that's pointed at dev-2. When we migrate dev-1 properly the dev.maps.solidarityeconomy.coop domain will be deleted. |
Doesn't seem to make any sense to start doing more on dev-1. |
Yeah maybe it doesn't make sense to add new hookrunner targets for ICA and DotCoop to dev-1 if things are moving to dev-2. I'm guessing adding hookrunner targets to dev-1 is less work than setting up the whole hookrunner on dev-2? But maybe we should bite the bullet and do it since we'll need this soon anyway. I think @wu-lee is best placed to set up the hook runner on dev-2 since he made it and knows how it works for mykomap. Then I'm happy to sort out the testing branch to point at this fix. @ColmDC up to you to decide how to prioritise this, so that the testing of this feature can be unblocked. |
The only problem with putting things like this on dev-2 is that there's a bunch of stuff set up on dev-1 already. So it means either having two hook-runners running in parallel, which is confusing in various ways, or moving the whole lot, which is much more work and adds more cans of worms to something which is otherwise relatively simple. (All the git projects need reconfiguring manually to send their webhook notifications to a new URL, for example.) Just adding this to the existing dev-1 instance would mean that it gets moved with everything else when that happens - so it won't get lost. If we want to do this quick, I recommend using the hook-runner we have now. The move to dev-2 can be done too, perhaps in parallel, but seems to be lower down the priority than various other tickets, including this one, and so this issue might get blocked by that. |
@colm This is ready for QA. I've set up the hook runner according to the Git workflow designed here by me and @wu-lee , for the ICA and DotCoop maps. Since this feature was merged into Note that these are still on dev-1. It was too much work to move everything to dev-2 at this stage, since the hook runner isn't set up there, but once we have trialled this on dev-1 and setup some automation scripts, it should be easier to move it over to dev-2. |
Happy to close this, and can someone set defaultOpenSidebar to be true for future dotcoop releases. |
I've updated this on the https://dev.maps.solidarityeconomy.coop/qa/dotcoop/ The version here used to be deployed by pushes to |
Here's the link to the editable diagram: https://drive.google.com/file/d/1Fu8zt5fdMXIXnyZz944CqwAo-vKdsFYY/view?usp=sharing https://dev.dotcoop.solidarityeconomy.coop/ now needs to be manually deployed, by setting up the |
This has been tested - seems to be working, and is ready for merging to the main branch. |
Please track against the clockify project [DotCoop - Misc]
Description
Support ability to configure a MM to specify what tab is selected on startup within the side panel
Acceptance Criteria
The text was updated successfully, but these errors were encountered: